Using nginx 1.2.7
Trying to figure out what and why is removing cache entries about 10 min
after insert (or last read - not yet sure) when the Cache-Control +
Last-Modified is nearly 24 hours in the future. Are my config / response
headers to blame or something else?
Ex I would expect the following entry to remain until 22:24:45 Apr 10,
2015
- yet it disappears from nginx cache dir about 10 min into existence -
i.e.
at around 22:35 Apr 9:
[clabs@lb1 cache]$ head 5c395f3ff23eaa0fae58000e5cdbb30a
8Pyote/1-?&U?@<
KEY: /ge/ge.js
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Last-Modified: Thu, 09 Apr 2015 22:24:45 GMT
Cache-Control: max-age=86400, public
Content-Type: text/javascript;charset=UTF-8
Content-Language: en-US
Content-Length: 153734
Date: Thu, 09 Apr 2015 22:24:45 GMT
…and config:
proxy_cache_path /opt/clabs/nginx/tmp/cache keys_zone=static:1000m;
server {
server_name OMITTED;
listen 80;
proxy_cache static;
proxy_cache_key "$uri";
location / {
proxy_pass http://search-cluster;
add_header "X-ECR-Nginx-Cache" $upstream_cache_status;
add_header "X-ECR-Domain" "static";
}
}
thanks
-nikita
Posted at Nginx Forum: