Re: Output_Cache Module

From: Date: Sat, 24 Feb 2001 03:09:26 +0000
Subject: Re: Output_Cache Module
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1488@lists.php.net to get a copy of this message
--- Vinai Kopp <kopp@netzarbeiter.de> wrote: > I didn't change very much, you can see for yourself: > http://vinais.home-in-the.net/pear/cache/ > > Mostly renaming the Classes because they aren't only > for caching output > now :) > I added the isExpired functions as well... I think you might also want to add some locking mechanism when caching to a file, in this way 2 different script instances will not get into a race condition. It might not belong in the design you are using, but checking for validity of the data will also be important, so the caching will happen automagically when the data changes. Assuming that the script is pulling data from a source that can be checked using a timestamp or an MD5 hash, etc. Caching different output depending on variables will be also useful. So, for example, you could cache info from a page that generates different ouput depending on the user type (admin, guest, etc.) I wrote someting along these lines over a year ago (I mentioned this before), released the code on June last year, and have contended with some of the issues above. If you find the ideas useful, check the docs (and the .tar.gz files) at www.scripps.edu/~jesusmc/cachedtpl, or at www.castagnetto.org/CachedTemplate.php (last site -unfinished- uses that class) Cheers. ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.pear (#1488) next »