#105776Negative cache lifetime calculated for page cache
Description
When a page has a starttime or endtime setting in the past, a negative cachetime is calculated. This will result in caches that are never used or will even throw an exception, like when using the RedisBackend.
The problem seems to be in the method \TYPO3\CMS\Frontend\Cache\CacheLifetimeCalculator::calculateLifetimeForRow. If a record, like a pages row, has a starttime, the cachetimeout is calculated as $starttime - $currenttime “. If the starttime is in the past, the resulting cache TTL is negative.
Tested with TYPO3 13.4.1 with the redis backend used for the page cache.
Reviews 3
Related issues 1
History 36
-
Gerrit Code Review pushed patch set 1 for main to change 87390 status
NewUnder Review <span data-processor="relativetime" data-value="2024-12-06T15:29:49+00:00" > 12/06/24, 15:29 </span> -
Gerrit Code Review pushed patch set 2 for main to change 87390 <span data-processor="relativetime" data-value="2024-12-06T15:33:32+00:00" > 12/06/24, 15:33 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 87402 <span data-processor="relativetime" data-value="2024-12-09T12:11:15+00:00" > 12/09/24, 12:11 </span>
-
Sascha Nowak commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-12-09T12:25:11+00:00" > 12/09/24, 12:25 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-08-12T14:36:30+00:00" > 08/12/25, 14:36 </span> -
SAMUEL LIU changed Related to #107316 <span data-processor="relativetime" data-value="2025-08-20T15:32:46+00:00" > 08/20/25, 15:32 </span>
Applied in changeset commit:63c52df0c62e0d6f736a9fdeabc9b197b318b4c5.