[edit] proxy_cache_bypass

Syntax: proxy_cache_bypass string ...
Default:
Context: http
server
location
Reference: proxy_cache_bypass


The directive specifies the conditions under which the answer will not be taken from the cache. If at least one of a string variable is not empty and not equal to "0", the answer is not taken from the cache:

 proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment;
 proxy_cache_bypass $http_pragma $http_authorization;

Note that the response from the back-end is still eligible for caching. Thus one way of refreshing an item in the cache is sending a request with a header you pick yourself, e.g. "My-Secret-Header: 1", then having a proxy_cache_bypass line like:

proxy_cache_bypass $http_my_secret_header;

Can be used in conjunction with the directive proxy_no_cache.


Module: HttpProxyModule