Answer the question
In order to leave comments, you need to log in
Why doesn't nginx update the fastcgi cache in this case?
fastcgi_cache_path /var/tmp/cache-html levels=1:2 keys_zone=cache_html:16m inactive=1y max_size=4g;
location /index.php {
internal;
try_files /index.php =403;
include fastcgi_params;
fastcgi_pass unix:/etc/alternatives/php-fpm.sock;
set_by_lua_block $key {
return ngx.var.request_language .. '/' .. ngx.var.request_uri:sub(1, (ngx.var.request_uri:find('?') or (ngx.var.request_uri:len() + 1)) - 1):gsub('[/\\]+', '/')
}
fastcgi_cache_key $key;
fastcgi_cache cache_html;
fastcgi_cache_min_uses 1;
fastcgi_cache_lock on;
fastcgi_cache_background_update on;
fastcgi_cache_use_stale updating;
gzip off;
gunzip on;
}
Allows you to run a background subrequest to update an expired cache item while a stale cached response is being returned to the client. Using an obsolete cached response at the time it is being updated should be allowed(allowed with fastcgi_cache_use_stale_updating: updating), it seems that the page simply has the status "updating" for some reason, but in fact there is no update.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question