Project

General

Profile

Actions

Bug #20615

closed

Memcached backend does not work well if cache of a page shall expire after 30 days

Added by Vladimir Podkovanov over 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-06-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If page's "Cache expires" setted to 1 month then Memcached backend does not cache page properly.
For example for page's "Cache expires" < 1 month or default I'm getting parse time for page 91ms. When setted to 1 month page's parse time is 487ms that is the same as if no cache at all.
This applies only to memcached, with DB it works as intended.

http://de.php.net/manual/en/memcached.expiration.php
(issue imported from #M11326)


Files

bug_11326.diff (1.56 KB) bug_11326.diff Administrator Admin, 2009-10-15 00:59
bug_11326_ver2.diff (1.75 KB) bug_11326_ver2.diff Administrator Admin, 2009-10-21 12:26
Actions #1

Updated by Vladimir Podkovanov over 15 years ago

From memcached docs:

"Expiration times
----------------

Some commands involve a client sending some kind of expiration time
(relative to an item or to an operation requested by the client) to
the server. In all such cases, the actual value sent may either be
Unix time (number of seconds since January 1, 1970, as a 32-bit
value), or a number of seconds starting from current time. In the
latter case, this number of seconds may not exceed 60*60*24*30 (number
of seconds in 30 days); if the number sent by a client is larger than
that, the server will consider it to be real Unix time value rather
than an offset from current time."

so maximum is 60*60*24*30 = 2592000
in $TCA['pages'] we have 2678400 secs (31 days) in 1 month expiration option

so IMHO proper handling is
1) change 1 month's value to 2592000
2) correct class.t3lib_cache_backend_memcachedbackend.php so expiration over 2592000 secs is not being passed to memcached as it is considered then as Unix timestamp

Actions #2

Updated by Oliver Hader about 15 years ago

Does this problem still exist on your system?

Actions #3

Updated by Vladimir Podkovanov about 15 years ago

Hi Oliver, just checked with latest trunk - yes, the bug still exists.

Actions #4

Updated by Vladimir Podkovanov about 15 years ago

have uploaded patch

Actions #5

Updated by Oliver Hader almost 15 years ago

Committed to SVN Trunk (rev. 6577)

Actions

Also available in: Atom PDF