Roman Arutyunyan
May 17, 2017 07:14AM
Hi,

On Wed, May 17, 2017 at 03:29:03AM -0400, mkuehn wrote:
> Hi Francis,
>
> thanks a lot for your reply!
>
> I tried to use proxy_cache_background_update with the following config
> part.
>
> proxy_cache_path /var/cache/nginx/spieldaten levels=1:2
> keys_zone=spieldaten:100m max_size=150m inactive=5d use_temp_path=off;
> ... ... ...
> proxy_cache test;
> proxy_cache_valid 200 302 1m;
> proxy_cache_valid 404 1m;
> proxy_cache_valid any 2m;
> proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
> proxy_cache_use_stale error timeout updating http_500 http_502
> http_503 http_504;
> proxy_cache_lock on;
> proxy_cache_background_update on;
>
> So my hope was with an inactive setup of 5d, even the requests which are not
> often called, will be keep i the cache and proxy_cache_background_update
> will do the magic - if a user request content, it will be fetch the "old"
> one from the cache and nginx will fetch a fresh copy in the background.
> But unfortunately the user gets always the old one from the cache, if
> proxy_cache_background_update is on - so something must be wrong with my
> config?!?

Can you check if the update request comes to your backend when user gets the
old cached response?

[..]

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Auto refresh for expired content?

mkuehn May 16, 2017 12:47PM

Re: Auto refresh for expired content?

Francis Daly May 16, 2017 01:20PM

Re: Auto refresh for expired content?

mkuehn May 17, 2017 03:29AM

Re: Auto refresh for expired content?

Roman Arutyunyan May 17, 2017 07:14AM

Re: Auto refresh for expired content?

mkuehn May 17, 2017 09:07AM

Re: Auto refresh for expired content?

Roman Arutyunyan May 18, 2017 07:44AM

Re: Auto refresh for expired content?

mkuehn May 18, 2017 10:02AM

Re: Auto refresh for expired content?

mkuehn May 29, 2017 10:21AM

Re: Auto refresh for expired content?

Francis Daly May 17, 2017 11:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
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