Conditional based cache control

Zhang Chao zchao1995 at
Sat Sep 9 14:30:50 UTC 2017


I think you can consider the ngx_lua, you can achieve your purpose easily
by this. :)

On 9 September 2017 at 21:36:06, Ish Sookun (ish at wrote:


I need to write a config that will set the "Cache-Control" value of a
resource based on the age of the latter returned by the origin server.
E.g if a resource is older than X hours then the Cache-Control should
have a specific value.

Anybody ever done that?

I am hoping to be able to find something by starting with the
"Last-Modified" value that is returned by the origin server.


Ish Sookun
nginx mailing list
nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list