Hey, you can find the modified session.lua here: http://plotshare.com/sessions.lua
<http://plotshare.com/sessions.lua>You usually use session.open(id) either with an id or nil (so a new session id will be created) this functions automatically loads the session, if it is available. Via session.data you can access and store all your data. Don`t forget to call session.save() after big changes, so these things will be remembered. I really like the concept of serialization in lua because you still edit your data afterwards. Also it is very easy to use and in my opinion perfect for small to medium session sizes. I use session in a way that it is saved on the server and everyone else can access these sessions by the session id. That is very convenient when you want to share certain things - like on http://www.plotshare.com<http://www.plotshare.com > . Cheers, Ben On Sun, Feb 28, 2010 at 9:08 PM, Fabio Mascarenhas <mascaren...@acm.org>wrote: > On Sun, Feb 28, 2010 at 5:37 PM, Ryan Pusztai <rpusz...@gmail.com> wrote: > >> Benjamin, >> >> On Fri, Feb 26, 2010 at 7:56 PM, Benjamin von Ardenne < >> benjamin.von.arde...@googlemail.com> wrote: >> >>> I am using orbit together with a slightly changed session.lua from cgilua >>> that helps me to keep track of any data throughout any page. The only thing >>> you have to keep track is the session id that you can save in a cookie for >>> example. Whenever you open a new page, you can load this session id and with >>> this id, the actual session with the data in it. >> >> >> Is there any way I can look at the modified 'session.lua'? Plus a simple >> example of how you used it? Thanks. >> >> Fabio and all, >> >> Can I get more information about sessions? Does Orbit have this >> functionality already? I don't have CGILua installed and was wondering if >> there is any way to do this in pure Orbit? >> > > Hi Ryan, > > If your session data is small, a scalable and easy way of doing sessions is > to serialize, encrypt it and store the session data in a cookie. > > Or you can generate a random session id string and serialize the session > data to the database using orbit.model, and store just the session id in the > cookie. > > Session support specific to your application is pretty easy to roll your > own, so I never bothered to bake it into Orbit. > > You can find CGILua's cgilua.session here: > http://github.com/keplerproject/cgilua/blob/master/src/cgilua/session.lua > > -- >> Regards, >> Ryan >> >> > -- > Fabio Mascarenhas > > > _______________________________________________ > Kepler-Project mailing list > Kepler-Project@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project > http://www.keplerproject.org/ >
_______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/