lua_code_cache设置成off导致init_by_lua_block是每个请求执行一遍
chnliyong opened this issue · comments
https://github.com/openresty/lua-nginx-module#init_by_lua
In case that the lua_code_cache directive is turned off (default on), the init_by_lua handler will run upon every request because in this special mode a standalone Lua VM is always created for each request.
开发环境时用的配置,线上环境是要打开cache的。
我修改备注一下。