Tillman has asked for the wisdom of the Perl Monks concerning the following question:
How does one clean up after Apache::Session::File? I'm using it to implement sessions in HTML::Mason as per the example file included with that package, and I have a series of files building up in /tmp. I noticed that when a web user wanders through the web site that the .lock files update their time stamp but the actual session files don't ... so I can't use a "delete everything older than 4 hours" cron job to do this.
It looks like Apache::Session::Lock::File implements a 'clean' method which will, in theory, eliminate session files older than a tweakable number of seconds. I suspect that I can use this in a perl script run from cron to clean things up periodically, but I'm not sure how to go about it. Pointers to TFM (sample code especially) would be appreciated :-)
|
|---|