I can’t store data while I’m using proxy_pass to connect to the backend
if we can’t find data on the memcached. srcache_fetch probes the
memcached but since no data, it connect to the backend and get the
correct data but not executing the srcache_store. Here is my config.
I can’t store data while I’m using proxy_pass to connect to the backend
if we can’t find data on the memcached. srcache_fetch probes the
memcached but since no data, it connect to the backend and get the
correct data but not executing the srcache_store.
Can you enable the debug logs in your nginx build and paste the
relevant logs here? To enable the debug logs, just re-compile your
nginx with the --with-debug configure option, and also use the “debug”
log level in your “error_log” config directive in your nginx.conf.
Also telling me the outputs of the “/path/to/your/nginx -V” command
and “uname -a” command on your side may also be helpful
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