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

Re: [cgiapp] Understanding sessions


>  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://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.