When proxy_cache_lock_age expires and one more request is allowed to go thru to populate the cache, is the previous request canceled?

Viewed 329

https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_lock

When enabled, only one request at a time will be allowed to populate a new cache element identified according to the proxy_cache_key directive by passing a request to a proxied server. Other requests of the same cache element will either wait for a response to appear in the cache or the cache lock for this element to be released, up to the time set by the proxy_cache_lock_timeout directive.

and proxy_cache_lock_age:

If the last request passed to the proxied server for populating a new cache element has not completed for the specified time, one more request may be passed to the proxied server.

The documentation isn't clear on this. Two requests won't be populating the same cache entry right? So the first one will have to give up and clean up, correct?

0 Answers
Related