You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/21 04:26:17 UTC

[GitHub] [apisix] galaxy-sea opened a new issue, #7096: bug: proxy-cache not support restful api

galaxy-sea opened a new issue, #7096:
URL: https://github.com/apache/apisix/issues/7096

   ### Current Behavior
   
   ```json
           "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"]
           }
   ```
   
   Test Plugin:
   ```
   $ curl http://127.0.0.1:9080/hello -i
   HTTP/1.1 200 OK
   Content-Type: application/octet-stream
   Content-Length: 6
   Connection: keep-alive
   Server: APISIX web server
   Date: Tue, 03 Mar 2020 10:45:36 GMT
   Last-Modified: Tue, 03 Mar 2020 10:36:38 GMT
   Apisix-Cache-Status: MISS
   
   hello
   ```
   
   ```
   $ curl http://127.0.0.1:9080/hello -X POST -i
   HTTP/1.1 200 OK
   Content-Type: application/octet-stream
   Content-Length: 6
   Connection: keep-alive
   Server: APISIX web server
   Date: Tue, 03 Mar 2020 11:14:46 GMT
   Last-Modified: Thu, 20 Feb 2020 14:21:41 GMT
   Apisix-Cache-Status: HIT
   
   hello
   ```
   
   
   
   
   
   ### Expected Behavior
   
   ```json
           "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"]
           }
   ```
   
   Test Plugin:
   ```
   $ curl http://127.0.0.1:9080/hello -i
   HTTP/1.1 200 OK
   Content-Type: application/octet-stream
   Content-Length: 6
   Connection: keep-alive
   Server: APISIX web server
   Date: Tue, 03 Mar 2020 10:45:36 GMT
   Last-Modified: Tue, 03 Mar 2020 10:36:38 GMT
   Apisix-Cache-Status: MISS
   
   hello
   ```
   
   ```
   $ curl http://127.0.0.1:9080/hello -X POST -i
   HTTP/1.1 200 OK
   Content-Type: application/octet-stream
   Connection: keep-alive
   Server: APISIX web server
   Date: Tue, 03 Mar 2020 11:14:46 GMT
   Last-Modified: Thu, 20 Feb 2020 14:21:41 GMT
   
   modify hello
   ```
   
   
   
   
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   11
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7096:
URL: https://github.com/apache/apisix/issues/7096#issuecomment-1133917897

   Hi @galaxy-sea I don't understand what you are trying to say.
   
   1. From your description, I don't see anything related to restful api;
   2. Can you describe the Expected Behavior in detail?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander closed issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #7096: bug: proxy-cache not support restful api
URL: https://github.com/apache/apisix/issues/7096


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] galaxy-sea commented on issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
galaxy-sea commented on issue #7096:
URL: https://github.com/apache/apisix/issues/7096#issuecomment-1134050000

   > @galaxy-sea Do you mean that when you create a route with the `proxy-cache` plugin, the actual behaviors doesn't match the one specified in the plugin (the second POST request should not hit the cache) ?
   
   yes , the second POST request should not hit the cache.
   是的,POST 请求不应该命中缓存


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] galaxy-sea commented on issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
galaxy-sea commented on issue #7096:
URL: https://github.com/apache/apisix/issues/7096#issuecomment-1134069103

    APISIX version is 2.10.1,
    
    Apache APISIX does not implement the standard HTTP cache😭😭😭.
    


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7096:
URL: https://github.com/apache/apisix/issues/7096#issuecomment-1134047031

   @galaxy-sea Do you mean that when you create a route with the `proxy-cache` plugin, the actual behaviors doesn't match the one specified in the plugin (the second POST request should not hit the cache) ?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] soulbird commented on issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #7096:
URL: https://github.com/apache/apisix/issues/7096#issuecomment-1134134548

   The configuration of cache_method, under the disk policy, controls whether the response will be written to the cache. During the request process, if the cache_key matches, the data in the cache will be retrieved to respond to the client


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7096: bug: proxy-cache not support restful api

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7096:
URL: https://github.com/apache/apisix/issues/7096#issuecomment-1134061517

   @galaxy-sea What's your APISIX version? Would you try to use the latest APISIX and set the `cache_strategy` to `memory` to see the result?
   
   The default cache strategy is disk and I'm afraid there is bug there about the cache method handling.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org