How to use srcache_store while proxy_pass use to connect backend

agentzh agentzh at
Thu Mar 8 06:01:52 UTC 2012

On Thu, Mar 8, 2012 at 1:51 PM, n1xman <nginx-forum at> wrote:
> /var/log/nginx/error.log

The line 182 in your error.log snippet gives you the answer:

2012/03/08 10:49:10 [debug] 20521#0: *11 srcache_store skipped due to
response header Cache-Control

That is, the response from your backend server explicitly prohibits
caching via the Cache-Control response header. And the line 191 in
your error.log snippet confirms this:

Cache-Control: no-cache

If you want to enforce caching in this very case, just turn on the
srcache_store_no_cache config directive, like

    srcache_store_no_cache on;

See for
more details.

Or turn off the srcache_response_cache_control config directive to
make ngx_srcache ignore the Cache-Control response header altogether:

    srcache_response_cache_control off;

for more details.

Best regards,

More information about the nginx mailing list