Re: [PHP-PEAR] Output_Cache Module
[email protected] ("Jesus M. Castagnetto") Fri, 23 Feb 2001 19:09:26 -0800 (PST)
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
--- Vinai Kopp <[email protected]> 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 ([email protected]) __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/