January 24, 2011 05:32AM
Hi, folks!

I'm delighted to announce the ngx_lua v0.1.4 release which features
the ability to disable the Lua code cache to ease Lua development. You
can get the release tarball from the download page:

By default, Lua code loaded into the ngx_lua module will be cached
(the compiled/JIT'd form will be cached). So changing .lua files
requires reloading or restarting the nginx server. From this release,
we can use the following directive to disable the code cache:

    lua_code_cache off;

Then the Lua files referenced in set_by_lua_file, content_by_lua_file,
access_by_lua_file, and rewrite_by_lua_file won't be cached at all,
and Lua's "package.loaded" table will be cleared at every request's
entry point (such that Lua modules won't be cached either). So
developers and enjoy the PHP-way, i.e., edit-and-refresh.

But please note that Lua code inlined into nginx.conf like those
specified by set_by_lua, content_by_lua, access_by_lua, and
rewrite_by_lua will *always* be cached because only nginx knows how to
parse nginx.conf and the only way to tell it to re-load the config
file is to send a HUP signal to it or just to restart it from scratch.

For now, ngx_lua does not support the "stat" mode like Apache's
mod_lua, but we will work on it in the future.

This release also contains a small over-all optimization that the keys
used for Lua code cache lookups are pre-calculated at config time
wherever possible.

The ngx_lua module embeds the Lua/LuaJIT interpreter into the nginx
core and integrates the powerful Lua threads (aka Lua coroutines) into
the nginx event model by means of nginx subrequests.

You can get the latest source code and full documentation from the
ngx_lua's project page:

Have fun!

nginx-devel mailing list
Subject Author Views Posted

[ANN] ngx_lua v0.1.4: ability to disable the Lua code cache

agentzh 2756 January 24, 2011 05:32AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 358
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready