Re: [PHP-PEAR] Output_Cache Module

[email protected] (Björn Schotte) Sat, 24 Feb 2001 12:41:23 +0100
Newsgroups php.pear
Message-ID <[email protected]>
* Christian Stocker wrote:
> maybe as an additional feature i can imagine that. but calculating a md5
> hash every time has some speed penalties... in our application, all the
> relevant content data comes out of a database, so maybe a timestamp could
> be useful for that :) but at the moment we just delete the appropriate
> cache-file/entry, when we change the content of the pages

I prefer having a is_valid_cache() method which can be overwritten
in an extended class and checks itself about the validity of the
cached data container.

The PEAR caching class itself should come with a set of properties
like time stamp, md5 hash and so on and the developer can choose
"Oh, I want to cache and test the validity with the time stamp" or
extend the class itself with his own testing method/property to
set a data container to "valid" / "expired" etc.

-- 
Björn Schotte                                      [email protected]
http://rent-a-phpwizard.de/                   [email protected]

Software dev advocate: http://www.advogato.org/person/baerli/