try_files based on file mtime?

Manlio Perillo manlio_perillo at libero.it
Sun Jun 13 21:20:11 MSD 2010


stdragon ha scritto:
> Igor Sysoev Wrote:
> -------------------------------------------------------
>> On Sat, Jun 12, 2010 at 12:19:16AM -0400, stdragon
>> wrote:
>>
>>> How do I implement that last part? Say I want
>> cached pages to last 2 minutes. Something like
>> this would be perfect:
>>> try_files 2m blah/blah/$uri @otherwise;
>>>
>>> What's the best way to do this?
>>>
>>> If there's not a great way right now, would this
>> be better/easier for me to implement as a patch to
>> try_files or as a separate module with a separate
>> command?
>>
>> Why not use the proxy/fastcgi cache ?
>>
> 
> I thought about doing that first, but it seems difficult to let php control the cache, like deleting specific files or clearing the entire cache when certain events happen.
> 

What about proxy/fastcgi store, instead?

Stored response from backend are saved to well know files, so you have
full control over them.

It's not a cache, however.



Regards



More information about the nginx mailing list