Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 4494) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -1792,8 +1792,22 @@ function cHashParams($addQueryParams) { return t3lib_div::cHashParams($addQueryParams); } - + /** + * Sets the cache expiration timestamp + * + * @param integer Expiration timestamp when the cache is outdated + * @return void + * @access public + */ + function setPageCacheExpiresTimestamp($timestamp) { + if ($timestamp > $GLOBALS['EXEC_TIME'] && ($this->cacheExpires == 0 || $timestamp < $this->cacheExpires)) { + $this->cacheExpires = $timestamp; + } + } + + + /** * Initialize the TypoScript template parser * * @return void @@ -2694,6 +2708,16 @@ function setPageCacheContent($content, $data, $expirationTstamp) { $this->clearPageCacheContent(); + // only if content is not "message_page_is_being_generated" + // which expires after 30 seconds + if (!$this->tempContent) { + // can be changed from an extension via $GLOBALS['TSFE']->setPageCacheExpiresTimestamp() + // $this->cacheExpires is default 0 + if ($this->cacheExpires > $GLOBALS['EXEC_TIME'] && $expirationTstamp > $this->cacheExpires) { + $expirationTstamp = $this->cacheExpires; + } + } + $cacheData = array( 'hash' => $this->newHash, 'page_id' => $this->id,