On Fri, 8 Sep 2000, Perrin Harkins wrote:

> On Fri, 8 Sep 2000, Roger Espel Llima wrote:
> > > - If possible, use some existing cache module for the storage, like
> > > Apache::Session or one of the m/Cache/ modules on CPAN.
> > 
> > Others have suggested Storable.  I've used this one before, and I can
> > agree that it's probably a good solution.
> 
> Storable is just a way to turn a complex data structure into a single
> scalar.  You still need to handle the file manipulation yourself.  Most of
> the existing cache modules use Storable to serialize to a scalar and then
> files or shared memory or a dbm for actual storage.

I would delegate the tieing, serialization, and locking to a module
like Apache::Session  (It uses Storable internally).

Then the user can specify their own favorite backing store and locking
mechanism by subclassing Apache::Session.

I would also look to the Memoize module for
ideas:  http://search.cpan.org/search?dist=Memoize

-Tim

Reply via email to