talexb has asked for the wisdom of the Perl Monks concerning the following question:

A web application that I'm supporting uses Cache::Cache from a mod-perl module. Even though the cache is supposed to clean up after itself, that doesn't happen, presumably because mod-perl never exits.

The (brute force) solution that I've come up with is to use tmpwatch to age the cache. Is there a more elegant solution that anyone can suggest?

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

  • Comment on Cleaning up after Cache::Cache called from mod-perl

Replies are listed 'Best First'.
Re: Cleaning up after Cache::Cache called from mod-perl
by Fletch (Bishop) on Sep 30, 2004 at 14:48 UTC

    Maybe set up a PerlLogHandler which calls $cache->Purge to clean up expired items after the user's request has been serviced.