* Fixed bug #12786: Wrong mouseover cursor at icon of docheader (thanks to Georg Ringer)
* Fixed bug #12792: Unit test checkGetExtensionKeyByPrefix of the t3lib_extmgm_testcase fails
+ * Fixed bug #11326: Memcached backend does not work well if cache of a page shall expire after 30 days (thanks to Vladimir Podkovanov)
2009-11-26 Francois Suter <francois@typo3.org>
/**
* Saves data in the cache.
*
- * Note on lifetime: the number of seconds may not exceed 2592000 (30 days),
- * otherwise it is interpreted as a UNIX timestamp (seconds since epoch).
- *
* @param string $entryIdentifier An identifier for this specific cache entry
* @param string $data The data to be stored
* @param array $tags Tags to associate with this cache entry
$tags[] = '%MEMCACHEBE%' . $this->cache->getIdentifier();
$expiration = $lifetime !== NULL ? $lifetime : $this->defaultLifetime;
+ // Memcached consideres values over 2592000 sec (30 days) as UNIX timestamp
+ // thus $expiration should be converted from lifetime to UNIX timestamp
+ if ($expiration > 2592000) {
+ $expiration += $GLOBALS['EXEC_TIME'];
+ }
+
try {
if(strlen($data) > self::MAX_BUCKET_SIZE) {
$data = str_split($data, 1024 * 1000);