Project

General

Profile

Actions

Bug #82380

closed

cache_clearAtMidnight wrong calculation of midnight

Added by Heinz Schilling about 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2017-09-08
Due date:
% Done:

0%

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

Description

In typo3 > sysext > frontend > Classes > Controller > TypoScriptFrontendController.php function get_cache_timeout() midnight is calculated by adding $cacheTimeout.

Line 4461:

$timeOutTime = $GLOBALS['EXEC_TIME'] + $cacheTimeout;

If config.cache_period > 86400 then midnight is far in the future. Cache for page with UID = 20 will clear at midnight in 7 days.

Example:

config.cache_period = 604800. 
[globalVar = TSFE:id = 20]
    config.cache_clearAtMidnight = 1
[GLOBAL]

Possible solution in line 4461:

$timeOutTime = $GLOBALS['EXEC_TIME'] + 86400;

Actions

Also available in: Atom PDF