[cgiapp] Understanding sessions

Brad Cathey breadwild at gmail.com
Sun Feb 24 14:07:18 EST 2008


Mark,

That was a big help. Mainly knowing that the cleaning up of these /tmp
files outside the realm of anything in my initial application. It does
make sense. I'll work on a cron job to eliminate the dead wood every
so often.

On Sun, Feb 24, 2008 at 10:24 AM, Mark Fuller <azfuller at gmail.com> wrote:
> >  1. how can those unnecessary sessions be deleted?
>
>  If you're on a unix system you can use the "find" command with the
>  "-mtime" option to find files in a directory older than a certain time
>  (-name to limit it to a certain pattern of filename). If you're not on
>  unix you could write a simple Perl script to do the same thing,
>  looping through all the filenames in a directory, using one of the -x
>  built-in functions. It would be simple. Pass it a path on the command
>  line, out put filenames in the stdout that could be used in a shell
>  loop to remove the files.
>
>  Usually "store" cleanup is something done outside the session tool.
>  You're using files for the session store. I use cache::cache[1].
>  Others use postgres. I think it's expected everyone does their own
>  cleanup of stores for sessions that haven't been visited after some
>  reasonable amount of time after the expiration time.
>
>  I don't use cgi::session. Cees or Mark S. would have to explain it
>  more specifically. I like cache::cache[1] because it has a method to
>  purge expired cookies. I can use a scheduled script which does nothing
>  more than instantiate the cache and invoke the method. I think you'd
>  have to create a driver to use it with c::s. I understand c::c is
>  being redone as chi..pm (search CPAN for it).
>
>  [1] http://search.cpan.org/~dclinton/Cache-Cache-1.05/lib/Cache/Cache.pm
>
>  Mark
>
>  #####  CGI::Application community mailing list  ################
>  ##                                                            ##
>  ##  To unsubscribe, or change your message delivery options,  ##
>  ##  visit:  http://lists.openlib.org/mailman/listinfo/cgiapp    ##
>  ##                                                            ##
>  ##  Web archive:   http://lists.openlib.org/pipermail/cgiapp/   ##
>  ##  Wiki:          http://cgiapp.erlbaum.net/                 ##
>  ##                                                            ##
>  ################################################################
>
>


More information about the cgiapp mailing list