Proxy-cache refresh

Hello

We are using the nginx proxy_cache module to cache big media files - per
default for 24h.
Is there a way to tell nginx to check regularly on the backend servers
if the file still exists or was being updated?

Thanks for your help and kind regards,
Nik

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

Hello!

On Thu, Oct 28, 2010 at 09:38:31AM -0400, niwo wrote:

Hello

We are using the nginx proxy_cache module to cache big media files - per
default for 24h.
Is there a way to tell nginx to check regularly on the backend servers
if the file still exists or was being updated?

Not exactly.

Best aproach currently available is to use

proxy_cache_use_stale updating;

and set lower expire time. This way nginx will re-download file
from backends periodically, while still serving most of the
requests from cache.

Maxim D.

Thanks for your answer Maxim!

Most important for us is that files disappear from the cache within 60
min after deletion from the origins
So, I think for us the best way to go at the moment is to us the
cache_purge module in order to delete files from the cache after they
have been delete from the origin as setting the expire time at 60 min is
not a good option for us.

Kind regards,
Nik

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs