monkeyDluffy6017 commented on issue #8719:
URL: https://github.com/apache/apisix/issues/8719#issuecomment-1407952607

   Could you follow the steps in 
https://github.com/apache/apisix/blob/master/t/plugin/proxy-cache/memory.t?
   1. define a memory zone 
   `lua_shared_dict memory_cache 50m;`
   2. config the route with the `proxy cache` plugin 
   ```
   ('/apisix/admin/routes/1',
                       ngx.HTTP_PUT,
                       [[{
                           "plugins": {
                               "proxy-cache": {
                                  "cache_strategy": "memory",
                                  "cache_key":["$host","$uri"],
                                  "cache_zone": "memory_cache",
                                  "cache_bypass": ["$arg_bypass"],
                                  "cache_method": ["GET"],
                                  "hide_cache_headers": false,
                                  "cache_ttl": 300,
                                  "cache_http_status": [200],
                                  "no_cache": ["$arg_no_cache"]
                               }
                           },
                           "upstream": {
                               "nodes": {
                                   "127.0.0.1:1986": 1
                               },
                               "type": "roundrobin"
                           },
                           "uri": "/hello*"
                      }]]
                      )
   ```
   ```


-- 
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]

Reply via email to