Issue Bug Closed

#82380cache_clearAtMidnight wrong calculation of midnight

Heinz Schilling 09/08/17, 13:40 updated 03/15/20, 14:33

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;

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.