Ski Kacoroski wrote:
> Hi,
>
> I have an app that uses C::A::P::Session and stores the sessions in
> /tmp. What is the best practice for deleting old sessions? Is it done
> from within the app (if so, how) or via a cron job that just deletes old
> files.
There are 2 ways I've done it in the past. Both have their pros and cons.
Inside the app - When a new session is created, take the time to inspect
the old data lying around and delete stuff that's too old.
pro: everything is inside the application
con: every login takes extra time. This may be too much time depending
on how busy the server is.
Cron job - simply delete stuff that's too old. Usually doesn't need to
be run more than once a day.
pro: does not slow down any portion of the site.
con: it's something external to the application that has to be
maintained.
Which one works for you is really about how much you need to scale.
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]