lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Saturday 03 February 2007, Zach Dwiel wrote:
> What I'd like to do is have a system where all of the data for my server is
> contained in a large Lua data structure.  Where can I create this data
> structure so that A) it is only created once and B) is visible from every
> page on the server.  Every place I tried to create this data, it would only
> satisfy one of these properties ... It would be created once but not
> visible from lua pages, or would be visible and created every time a page
> was generated or viewed.

check the 'stable' facility of CGILua.  i think not all launchers support it, 
at least mod_lua, FastCGI and Xavante do, but 'old CGI' doesn't (AFAIK)

as an anecdote, the code that later became Xavante started as a reaction to 
the 'delete and recreate all state' approach of CGILua.  Xavante handlers are 
simple functions on a long-lived environment.

but for the wide majority of cases the stable module is that's needed.

-- 
Javier

Attachment: pgpBSj_YmzSkr.pgp
Description: PGP signature