try_recent_files?

Yuval Hager yhager at yhager.com
Fri Dec 18 15:20:12 MSK 2009


I am using nginx to serve a dynamic (PHP) site, that saves generated pages 
statically for fast serving for anonymous users (Drupal + Boost module).

The expiration of these files is handled by a cron job that deletes these 
files when they are older than 10 minutes. This sounds like a good scheme, 
but on large amounts files, it takes time to go through all the files, so 
files may stay around longer (e.g. an hour).

Is it possible to implement in nginx some directive that will serve a static 
file only if it is recent? Something like:

try_recent_files <sec> <files> <default>

for example:

try_recent_files 600 $cached @dynamic;

If it is possible to implement it with the existing nginx, I have yet to 
find how - if not, well, then this is my feature request :)

Thanks,

-- 
Yuval Hager
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://nginx.org/pipermail/nginx/attachments/20091218/da26d380/attachment.pgp>


More information about the nginx mailing list