Reputation: 445
I haven't found it in the docs, but when I debug I see the following behavior:
So can one use query with cache-control: no-cache to update cache data?
Upvotes: 2
Views: 311
Reputation: 27218
What exactly do you want to accomplish?
If it was possible to bypass cache by simply issuing a request with this extra header, it'd probably be classified as a bug and a DoS vulnerability. At the very least, it would certainly make less sense as a default when caching is explicitly enabled by the administrator.
However, if bypassing the cache is your intention when the Cache-Control
is present in the request, then you could use something like http://nginx.org/r/proxy_cache_bypass together with one of the required http://nginx.org/r/$http_ variables:
proxy_cache_bypass $http_cache_control;
Upvotes: 3