lua-users home
lua-l archive

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


On Wed, 2004-11-24 at 21:41 -0300, André de Leiradella wrote:
> > a simple sessions library, like that of PHP, can make it easier to
> > retrieve objects from storage; but maybe the most Lua-like solution
> > would be just a global table where i could put any object (or tree of
> > objects) that i want to persist for another request.  then, i just
> > need a cookie to store the key. maybe some extra features like
> > setting a timeout to purge the object (to have expiring sessions)
> Take a look at lper, a persistent Lua implementation that relies on a
> malloc library that uses a mmapped file alloc memory. Don't know if it's
> easy to make it work with FastCGI or in a multithreaded environment
> though...

Aranha has a util.session module (available from
http://users.pepperfish.net/dsilvers/util.session/ ) which uses a
database to store the session contents. Perhaps you could take ideas
from that.

D.

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895