From: Mitra <mi...@mi...> - 2002-12-31 06:52:34
|
I've had some weirdness with old versions of pages being retrieved from the cache. One thing i notice is that on line 101 of slice.php3 it tests against nocache when doing a store. If I understand the logic, shouldn't nocache ONLY apply to retrieving from the cache. I.e. when you do a retrieve you set nocache, and it would ignore the cached value of the page, but would then cache the new, correct, page? It looks like the cache isn't being invalidated as the Spot's are being changed, this appears to be happening in site/index.php3 which doesn't appear to be doing any cache invalidation. I'm not sure how to invalidate the cache, since the example I find - site/modedit.php3:139 seems (if I understand things correctly) to invalidate the cache for all slices, so I'm guessing I'm misunderstanding something. Am I correct in assuming that invalidate call in modedit.php3:139 is buggy, and that I should add the code $cache = new PageCache($db,CACHE_TTL,CACHE_PURGE_FREQ); # database changed - $cache->invalidate("slice_id=".site_id); # invalidate old cached values into index.php3. I've done this - and it appears to work - but I wanted to check I'm understanding the cache logic correctly before I commit to CVS. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |