Re: [Cgi-session-user] session files don't get deleted after they expired, workaround?
Brought to you by:
sherzodr
From: <ste...@gm...> - 2008-01-03 11:26:55
|
Hi, you could use the (experimental) method find(), which will try to load all session objects stored on disk and which removes all expired ones (it won't do anything to the other, valid ones when using empty sub) > CGI::Session->find( sub {} ); You may put it either in a cronjob or start a small script with it manually (e. g. on a regular base). I wouldn't include this line into your normal script because it may need a few seconds if many sessions are active in parallel... If anybody out there knows a better way for this, I'd be glad to hear as well! Best regards Stefan. On 1/3/08, Andreas Schipplock <an...@sc...> wrote: > > Hi, > I'm using cgi::session 4.20 and I use the expire() method to set an > expire time for sessions and it really works great but I also expect > the sessionfile on disk (/tmp/cgisess_*) do be deleted after the > session has expired but that's simply not the case. > The files are small and aren't really a problem storage wise but I > can't delete session files on occasion :P as I don't know if they > expired or still valid. > > Can you give me a hint on how to solve that "problem"? > I really appreciate your help. > > Have a nice day, > Andreas. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Cgi-session-user mailing list > Cgi...@li... > https://lists.sourceforge.net/lists/listinfo/cgi-session-user > |