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

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


Hi!

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 http://something.com/someotherthing.jpg 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!

Regards,
Daniel

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,97693,97693#msg-97693




More information about the nginx mailing list