Nginx proxy_cache_background_update after cache expired

I'm trying to configure nginx to use proxy_cache_background_update, but it seems that after the expiration date, it still waits for a full transition back to the backend, returning MISS to X-Cache-Status. What am I doing MISSing?

I am using nginx 1.11.12 under ubuntu 14.04 running inside docker, but hopefully this is too verbose.

location ~ ^/?(\d+/[^/]+)?/?$
{
   expires 20s;

   proxy_cache app_cache;
   proxy_cache_lock on;

   proxy_cache_bypass $http_upgrade;

   proxy_pass http://172.17.0.2:5000;
   proxy_http_version 1.1;
   error_log    /nginxerror.log debug;

   add_header X-Cache-Status $upstream_cache_status;

   proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
   proxy_cache_background_update on;

   break;
}

      

+3
reverse-proxy nginx


source to share


No one has answered this question yet

Check out similar questions:

954
Node.js + Nginx - Now What?
448
Nginx no-www for www and www no-www
376
Nginx is a static file mess with root and alias
264
NGinx By default public www location?
226
How do I clear nginx cache?
2
Nginx FastCGI Cache $ upstream_cache_status; Do not show
1
Constantly reconfiguring Wordpress from nginx upstream
1
Nginx docker compose redirect delay
0
NginX ignores ETag
0
Nginx config for Drupal & Boost & ImageCache



All Articles
Loading...
X
Show
Funny
Dev
Pics