{"action":"closed","issue":{"url":"https://api.github.com/repos/openresty/srcache-nginx-module/issues/48","repository_url":"https://api.github.com/repos/openresty/srcache-nginx-module","labels_url":"https://api.github.com/repos/openresty/srcache-nginx-module/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/openresty/srcache-nginx-module/issues/48/comments","events_url":"https://api.github.com/repos/openresty/srcache-nginx-module/issues/48/events","html_url":"https://github.com/openresty/srcache-nginx-module/issues/48","id":157177325,"number":48,"title":"If-None-Match let cache MISS always","user":{"login":"mengskysama","id":4783870,"avatar_url":"https://avatars.githubusercontent.com/u/4783870?v=3","gravatar_id":"","url":"https://api.github.com/users/mengskysama","html_url":"https://github.com/mengskysama","followers_url":"https://api.github.com/users/mengskysama/followers","following_url":"https://api.github.com/users/mengskysama/following{/other_user}","gists_url":"https://api.github.com/users/mengskysama/gists{/gist_id}","starred_url":"https://api.github.com/users/mengskysama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengskysama/subscriptions","organizations_url":"https://api.github.com/users/mengskysama/orgs","repos_url":"https://api.github.com/users/mengskysama/repos","events_url":"https://api.github.com/users/mengskysama/events{/privacy}","received_events_url":"https://api.github.com/users/mengskysama/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-27T10:31:35Z","updated_at":"2016-06-02T02:46:00Z","closed_at":"2016-06-02T02:46:00Z","body":"Hi!\r\n\r\nIf-None-Match has been set cache is miss always. \r\n\r\nTest:\r\n\r\n`curl -I --header \"If-None-Match: 23333333\" http://xx.xx.fm/api/xxxxx`\r\nI think it's a bug or should can be configure.\r\n\r\n```\r\nHTTP/1.1 200 OK\r\nX-Cached-From: MISS\r\nX-Cached-Store: BYPASS\r\n```\r\n\r\nI used srcache-nginx-module-0.30 with openresty 1.9.7.4\r\n\r\nthis is my config\r\n```\r\n    location ^~ /api/ {\r\n\r\n        add_header X-Cached-From $srcache_fetch_status;\r\n        add_header X-Cached-Store $srcache_store_status;\r\n\r\n       set $key $uri;\r\n       set_escape_uri $escaped_key $key;\r\n\r\n       set_by_lua $exptime '\r\n           if string.find(ngx.var.uri, \"/api/liveshow/rank/\") then\r\n               return 300\r\n           end\r\n           return 60\r\n       ';\r\n\r\n       srcache_fetch GET /redis $key;\r\n       srcache_store PUT /redis2 key=$escaped_key&exptime=$exptime;\r\n\r\n       srcache_methods GET;\r\n\r\n       proxy_pass http://127.0.0.1:8881/api/;\r\n   }\r\n```\r\n\r\nthx:)"}}
{"actor":{"display_login":"mengskysama"}}