proxy_cache_path 'inactive' vs http cache-control / expires headers?

J.R. themadbeaker at gmail.com
Thu Apr 2 16:30:10 UTC 2020


I've been doing some experimenting with nginx's proxy caching and
slowly working the kinks out.

>From what I read, the cache-control & expires headers take precedence
over the 'proxy_cache_valid' setting, which is great as certain pages
are valid for several hours at a time.

However, I am noticing still a high amount of cache misses... Upon
further investigation I'm thinking (haven't tested it yet) that the
'proxy_cache_path' inactive setting (currently at its default of 10m)
is taking precedence over the above cache-control settings...

Is there any way to tie the 'inactive' time to the cache-control
header expiration time so that pages that are cached in a certain
time-window are always kept and not deleted until after the header
expiration time?


More information about the nginx mailing list