tinpad opened a new issue #5109: URL: https://github.com/apache/apisix/issues/5109
### Issue description I am using below command to enable proxy-cache plugin on my route - curl http://127.0.0.1:9080/apisix/admin/routes/73 -H 'X-API-KEY: xxxxxxxxxxxxxxxxxxx' -X PUT -d '{ "plugins": { "proxy-cache": { "cache_key": ["$uri", "-cache-id"], "cache_bypass": ["$arg_bypass"], "cache_method": ["GET"], "cache_http_status": [200], "hide_cache_headers": true, "no_cache": ["$arg_test"] } }, "upstream": { "service_name": "ORDERSERVICE", "type": "roundrobin", "discovery_type": "eureka" }, "uri": "/order/list" }' the configuration in config.yaml is as follows - proxy_cache: cache_ttl: 60s zones: - name: disk_cache_one memory_size: 50m disk_size: 1G disk_path: "/tmp/disk_cache_one" cache_levels: "1:2" ### Environment apisix version (cmd: apisix version): 2.8 OS (cmd: uname -a): 20.04.1-Ubuntu OpenResty / Nginx version (cmd: nginx -V or openresty -V): openresty/1.19.3.2 etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API): 3.4.0 apisix-dashboard version, if have: NA the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): luarocks version, if the issue is about installation (cmd: luarocks --version): 3.4.0 ### Steps to reproduce 1. Enable proxy-cache plugin 2. Add Configuration in config.yaml file as above. 3. Test with curl http://127.0.0.1:9080/order/list?pageSize=10 -i ### Actual result Here are two tests, executed within approx. 20 seconds curl http://127.0.0.1:9080/order/list?pageSize=10 -i HTTP/1.1 200 Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99 Date: Tue, 21 Sep 2021 11:22:07 GMT Server: APISIX/2.8 X-Request-Id: fef66141-0931-4e7e-9997-ffa60c10a1ff Apisix-Cache-Status: EXPIRED curl http://127.0.0.1:9080/order/list?pageSize=10 -i HTTP/1.1 200 Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive X-RateLimit-Limit: 100 X-RateLimit-Remaining: 98 Date: Tue, 21 Sep 2021 11:22:26 GMT Server: APISIX/2.8 X-Request-Id: 4682662d-0690-4eb5-89a9-f2df49ba2c91 Apisix-Cache-Status: EXPIRED ### Error log NA ### Expected result Here are two tests, executed within approx. 20 seconds curl http://127.0.0.1:9080/order/list?pageSize=10 -i HTTP/1.1 200 Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99 Date: Tue, 21 Sep 2021 11:22:07 GMT Server: APISIX/2.8 X-Request-Id: fef66141-0931-4e7e-9997-ffa60c10a1ff Apisix-Cache-Status: EXPIRED curl http://127.0.0.1:9080/order/list?pageSize=10 -i HTTP/1.1 200 Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive X-RateLimit-Limit: 100 X-RateLimit-Remaining: 98 Date: Tue, 21 Sep 2021 11:22:26 GMT Server: APISIX/2.8 X-Request-Id: 4682662d-0690-4eb5-89a9-f2df49ba2c91 Apisix-Cache-Status: HIT -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
