Welcome! Log In Create A New Profile

Advanced

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

June 13, 2010 05:15AM
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
Subject Author Posted

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

dandadude June 13, 2010 05:15AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready