#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.