[PHPTAL] Re: cache-refresh triggered by events
stefanmi at hotmail.com
Tue Aug 26 23:00:14 CEST 2008
> I'm wondering whether you're talking about the same thing that's already
> described in the manual:
> http://phptal.motion-twin.com/manual/en/split/ar06s05.html shows a possibility
> for custom caches.
Nice hint. But it doesn't quite fit the target i'd like to achive.
Any time complex data is edited i would like to have certain caches erased. Example would be
that i just created a complex news-item #102 and therefore -in this moment - all news-listings and
the news item 102 should be deleted.
Special about those caches is, that they need to know, which keywords they are bound to. I figured
that the easiest way is to store the keyword(s) in the filename. So once you edited a news entry
caches are scanned and you remove the once older then 2 weeks and the onces affected by
your editing actions (using keyword matching).
Adventage would be, no cache-condition like "if(time()>239429349)" anymore. These caches exists
up to the moment you want them to be renewed. Thats when the cache file doesn't exists no more.
If you have an idea how to tell your cache, what keywords/parameters he should delete himself on, i'd like to hear
your comments. I looked at the comments but still the only way i see is that little workaround i mentioned:
in combination with PHPTAL::refresh("cplxd") or PHPTAL::refresh("cplxdata_102") this cache would be deleted.
News, entertainment and everything you care about at Live.com. Get it now!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PHPTAL