Skip to content

bug: Unable to use memory proxy cache #8719

Description

@kamsz

Current Behavior

Memory proxy cache is failing

Expected Behavior

Memory proxy cache is working

Error Logs

2023/01/23 00:11:43 [error] 50#50: *521530 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/proxy-cache/memory.lua:47: attempt to index field 'dict' (a nil value)
stack traceback:
coroutine 0:
        /usr/local/apisix/apisix/plugins/proxy-cache/memory.lua: in function 'get'
        ...cal/apisix/apisix/plugins/proxy-cache/memory_handler.lua:204: in function 'phase_func'
        /usr/local/apisix/apisix/plugin.lua:1094: in function 'run_plugin'
        /usr/local/apisix/apisix/init.lua:615: in function 'http_access_phase'

Steps to Reproduce

    - name: proxy-cache
      enable: true
      config:
        cache_ttl: 60
        cache_strategy: memory
        cache_zone: memory_cache
        cache_bypass:
          - '$http_authorization'

Environment

  • APISIX version (run apisix version): 3.1.0
  • Operating system (run uname -a): Debian GNU/Linux 10 (buster)
  • 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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions