Hello!
On Thu, Jun 18, 2015 at 3:39 AM, Yiftah wrote:
> Hello, im writing an app with OpenResty and i am encountering an error.
> when im loading the page for the first time, the modules are loaded
> correctly and the app runs fine,
> however, on every page load after that, the code cache seems to be missing
> and the module loaded is nil.
> while debugging i found out that if i toggle lua_code_cache off, it seems to
> work on every load, so i think i may have an issue with the code cache
> would appreciate your help
>
Seems like you load your Lua modules in the wrong way (by abusing the
globals created by the module() function) or your Lua modules
incorrectly abuse Lua global variables.
Please see the following document for more details:
https://github.com/openresty/lua-nginx-module#lua-variable-scope
BTW, this is a Chinese list. English posts should go to the
openresty-en mailing list instead: https://openresty.org/#Community
Regards,
-agentzh