[TYPO3-dev] Bug in t3lib_pageSelect::storeHash()

Christian Kuhn lolli at schwarzbu.ch
Tue Aug 10 22:08:00 CEST 2010


Hi.

Chris Zepernick {SwiftLizard} wrote:
> Got anotherone:
> 
> cms/index_ts on each page load and reload makes a call to 
> tsfe->generatePage_postProcessing(), which calls 
> tsfe->realPageCacheContent(), which then calls
> tsfe->setPageCacheContent() ... if now TYPO3_UseCachingFramework is set 
> to true we use the caching framework.
> 
> Problem is here that setPageCacheContent() will only perform a
> cache->set no matter if the cache allready exists and is  not yet
> expired.
> 
> This means 2 Deletes and 2 inserts on each pageload (cache and cache_tags).
> 
> Wouldn`t it be better if setPageCacheContent() checks via
> cache->has() if the cache allready exists before the same cache is set 
> again ?
> 
> this would save us 4 querys each time you reload a page.

General problem is, that the data might have changed meanwhile. So, 
has() could return true, but then "old" data might be used. I need to 
take a deeper look into the logic to come to a conclusion in this case.

Quote: "There are only two hard things in Computer Science: cache 
invalidation and naming things”. Phil Karlton

Regards
Christian




More information about the TYPO3-dev mailing list