memcached - nginx not caching response from reverse proxy -


http://nginx.org/en/docs/http/ngx_http_memcached_module.html

basic config here:

worker_processes  2;  events {     worker_connections  1024; }  error_log  /var/log/nginx/nginx_error.log  warn; error_log  /var/log/nginx/nginx_error.log  info;  http {     upstream backend {         server localhost:3000;     }    server {       listen 80;        location / {           set            $memcached_key $uri;           memcached_pass 127.0.0.1:11211;           error_page     404 = @fallback;       }        location @fallback {           proxy_pass     http://backend;        }   } } 

it reverse proxy's request when hitting port 80, logs say:

2016/08/23 15:25:19 [info] 68964#0: *4 key: "/users/12" not found memcached while reading response header upstream, client: 127.0.0.1, server: , request: "get /users/12 http/1.1", upstream: "memcached://127.0.0.1:11211", host: "localhost" 

nginx memcached module not write memcached server. should in backend (for example php) using $memcached_key


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -