Welcome! Log In Create A New Profile

Advanced

nginx_cache entry evicted ~ 10 min after write despite Cache-Control in the future

April 09, 2015 06:33PM
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
Subject Author Posted

nginx_cache entry evicted ~ 10 min after write despite Cache-Control in the future

nikita.tovstoles April 09, 2015 06:33PM

Re: nginx_cache entry evicted ~ 10 min after write despite Cache-Control in the future

nikita.tovstoles April 09, 2015 06:53PM

Re: nginx_cache entry evicted ~ 10 min after write despite Cache-Control in the future

Francis Daly April 09, 2015 06:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 132
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready