[TYPO3-dev] performace of cachingframework

Peter Russ peter.russ at 4many.net
Fri Feb 18 11:03:54 CET 2011


--- Original Nachricht ---
Absender:   Bjoern Pedersen
Datum:       18.02.2011 10:50:
> Am 18.02.2011 10:47, schrieb Peter Russ:
>> --- Original Nachricht ---
>> Absender:   Bjoern Pedersen
>> Datum:       18.02.2011 09:05:
>>> Am 17.02.2011 22:50, schrieb Christian Kuhn:
>>>> Hey,
>>>>
>>>> On 02/17/2011 05:11 PM, Bjoern Pedersen wrote:
>>>>
>>>>> SELECT identifier FROM cachingframework_cache_hash WHERE crdate +
>>>>> lifetime<  1297803600 AND lifetime>  0;
>>>> ...
>>>>
>>>> Those queries are only fired by the garbage collection task, they are no
>>>> usual production queries from frontend?
>>>>
>>>> Regards
>>>> Christian
>>> Yes, that is correct. For normal cache retrieval the indentifier serves
>>> as key.
>>>
>>> I will see wether I can create a patch.
>> NO this it NOT correct. The caching framework will check on every
>> request ->has($key) if the cached content is "alive" :-(
>> So this patch is even more important on production.
>>
>> Peter.
>>
> Well, on production the key is used and normally will return just 1 or
> very few records where the scan for "is alive" has to be done. So there
> the impact is rather low. But of course I will consider this in my patch.
> 
> Björn

Sorry but your answer is not correct. Please check the code HOW it is 
handled in the dbbackend. Even if only true or false is returned query 
will always take lifetime into account.

Additionally there is an overhead as has and get are similar and always 
2 queries are required to receive a cached item. So using dbbackend for 
caching might even increase the number of queries and slow down delivery 
on high load sites.

If you would consider this in your patch it would help more ;-)

Peter.

-- 
docendo discimus

_____________________________
uon GbR
http://www.uon.li
http://www.xing.com/profile/Peter_Russ




More information about the TYPO3-dev mailing list