[TYPO3-core] RFC #11326: Bug: Memcached backend does not work well if page's Cache expires set to 1 month
Vladimir Podkovanov
admin at sitesfactory.ru
Thu Oct 15 18:20:22 CEST 2009
Hi Rupert,
I was thinking about cast exception in set() in case out of range
timeout, but your idea better, so it would be in consistence with other
backends behavior. So I will rewrite patch.
--
-rgds-
Vladimir
Rupert Germann wrote:
> hi Vladimir,
>
> good catch :-)
>
> your patch fixes the problem if lifetime is set by the page record. But
> what if someone sets a higher value by TS?
> I'd suggest to detect this in function set() and convert the given
> lifetime to an Unix timestamp if needed.
>
> Concerning the apc set() function I agree to remove the comment about
> the maximum lifetime. according to the docs there seems not to be such a
> limit.
>
> greets
> rupert
>
>
>
> Vladimir Podkovanov schrieb:
>> Hi all,
>>
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=11326
>>
>> Branches: trunk
>>
>> Problem:
>> If page's "Cache expires" ('cache_timeout' field) set to 1 month then
>> Memcached backend does not cache page.
>> It is because $TCA['pages'] has 2678400 secs (31 days) as value for 1
>> month 'cache_timeout' but memcached considers any value greater than
>> 2592000 (30 days) as unix timestamp not as timeout secs.
>> I've not checked with APC backend but the bug supposed to be there too
>> for the same reason.
>>
>> Solution:
>> 1 month' timeout changed 31 days -> 30 days in $TCA['pages'] definition.
>>
>> Notes:
>> Also I added note to t3lib_cache_backend_memcachedbackend::set().
>> There was same note for t3lib_cache_backend_apcbackend::set() so I've
>> copied one. But point here that I'm not sure the first note in
>> apcbackend is needed as I did not find in docs that there is limit
>> there (for APC), probably original note was intended for
>> memcachedbackend not for apcbackend. If it is the case then original
>> note could be deleted from apcbackend.
>>
More information about the TYPO3-team-core
mailing list