Auto refresh for expired content?
francis at daoine.org
Tue May 16 17:18:41 UTC 2017
On Tue, May 16, 2017 at 12:47:57PM -0400, mkuehn wrote:
> Now my question, is it possible that Nginx can "automaticly" get a fresh
> copy from the proxy_pass, when it recognized that the cached request is
> expired - so that none User has to wait about 5 sec to get fresh content and
> gets always fast data from the Nginx cache?
does http://nginx.org/r/proxy_cache_background_update sound like it can
do what you want?
You might be able to achieve most of what you want outside of nginx
by running a "curl" command to fetch the content every few minutes;
the hope being that the curl command will be the one that is waiting
for 5 seconds and causing the local cache copy to be updated, while the
"real" clients are fed from the cache.
Good luck with it,
Francis Daly francis at daoine.org
More information about the nginx