serve files from cache only if very sure that it didn't change

dandadude nginx-forum at
Sun Jun 13 13:15:17 MSD 2010


I was wondering (and searching forums, howtos, but didn't find anything):
Is there a way to tell nginx to only serve static files from cache if for instance the timestamp of the file is the same (that probably means that the file did not change)?
This would create an extra overhead of course, but not as much as not using cache at all. And with this method I could safely set this to sites that are actively developed, since if I use cache the normal way, developers will be crying about that they upload it and it doesn't change -> I wouldn't want this.

It is clear that the above requested method would only be good for real static content, php and other dynamic content shouldn't be cached at all if I have the above concerns.

Thanks in advance!


Posted at Nginx Forum:,97693,97693#msg-97693

More information about the nginx mailing list