caching on fast requests
caching on fast requests
Hello
Sorry if it's wrong place for such a question, but I don't know better one.
I'm using Vesta 0.9.8 (i686) Release: 17
I have a simple php script that show user IP. But I'm noticed a problem. When I'm making many requests to this script at the same time from different IP's via proxy - it returns same result page for most requests.
Example:
IP 111.111.111.111 - Result: 111.111.111.111
IP 111.111.111.112 - Result: 111.111.111.111
IP 111.111.111.113 - Result: 111.111.111.111
IP 111.111.111.114 - Result: 111.111.111.111
IP 111.111.111.115 - Result: 111.111.111.115
IP 111.111.111.116 - Result: 111.111.111.115
Looks like some kind of caching.
So I checked nginx setting and tried to add bypass instructions into php.ini
proxy_cache_bypass $http_pragma $cookie_nocache $arg_nocache$arg_comment;
Also from client side I've added headers
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
It didn't helped.
Currently server response looks like:
----------------------------------------------------------
HTTP/1.0 200 OK
Server: nginx
Date: Fri, 27 Oct 2017 20:03:37 GMT
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.6.31
Connection: keep-alive
Content-Length: 14
111.111.111.115
----------------------------------------------------------
Can you please help me?
Sorry if it's wrong place for such a question, but I don't know better one.
I'm using Vesta 0.9.8 (i686) Release: 17
I have a simple php script that show user IP. But I'm noticed a problem. When I'm making many requests to this script at the same time from different IP's via proxy - it returns same result page for most requests.
Example:
IP 111.111.111.111 - Result: 111.111.111.111
IP 111.111.111.112 - Result: 111.111.111.111
IP 111.111.111.113 - Result: 111.111.111.111
IP 111.111.111.114 - Result: 111.111.111.111
IP 111.111.111.115 - Result: 111.111.111.115
IP 111.111.111.116 - Result: 111.111.111.115
Looks like some kind of caching.
So I checked nginx setting and tried to add bypass instructions into php.ini
proxy_cache_bypass $http_pragma $cookie_nocache $arg_nocache$arg_comment;
Also from client side I've added headers
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
It didn't helped.
Currently server response looks like:
----------------------------------------------------------
HTTP/1.0 200 OK
Server: nginx
Date: Fri, 27 Oct 2017 20:03:37 GMT
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.6.31
Connection: keep-alive
Content-Length: 14
111.111.111.115
----------------------------------------------------------
Can you please help me?