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

Chris Zepernick {SwiftLizard} chris at swift-lizard.com
Tue Aug 10 13:50:23 CEST 2010


Hi guys,

I think I just found a bug in t3lib_pageSelect::storeHash(), at the use 
of the caching framework.

As far as I get it with different content this method will never be able 
to get the same hash, right ?

At the moment, if one uses the new cachingframework, this is the only 
condition checked before the cache->set is perfomed.

To my mind it would be more logical if we check if the hash already 
exists (cache->has) before we perform the cache->set action. This way we 
would prevent the delete and insert each time the page is loaded.

The other bug is that the method has the false lifetime default.
In current (4.3.5) Core the default lifetime is set to 0 instead of NULL
which leads to the problem that, in case of the caching framework, this
cache entry never lifes.

What do you think, am I right ?
Should this be fixed ? To my mind yes because otherwise storeHash 
combined with cachingframework will penetrate the db even if the hash 
allready exists.

regards

Chris




More information about the TYPO3-dev mailing list