-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directives srcache_store_pass_header didn't work #72
Comments
i tested by nginx 1.14.0. it have same problem |
https://github.com/openresty/srcache-nginx-module#srcache_methods I believe the MISS is because you're using |
HI,
I use srcache-nginx with memcached. i read your "README.markdown" then i know by defult command "srcache_store PUT /memc $key" can't store if http header have "Connection:keepalive" . so i add command "srcache_store_pass_header" to force store, but it isn't work.
My nginx.conf:
location = /memc {
internal;
set $memc_key $query_string;
set $memc_exptime 600;
memc_pass 127.0.0.1:11211;
}
location / {
set $my_key $request_uri;
srcache_fetch GET /memc $my_key;
srcache_store PUT /memc $my_key;
srcache_methods GET HEAD POST;
}
Test Result( I already exec twice ):
[root@test ~]#curl -I http://192.168.0.214/a.html
HTTP/1.1 200 OK
Server: Nginx/1.8.1
Date: Tue, 03 Jul 2018 02:35:10 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 42
Connection: keep-alive
Last-Modified: Wed, 27 Jun 2018 07:08:38 GMT
ETag: "2a-56f9a48ab6919"
Accept-Ranges: bytes
X-Cached: MISS
Memcached Result:
[root@test ~]#telnet 127.0.0.1 11211
get /a.html
END
Can you help me to fix this problem?
The text was updated successfully, but these errors were encountered: