Skip to content

Commit

Permalink
Merge pull request #390 from andersundsehr/bugfix/page-endtime
Browse files Browse the repository at this point in the history
πŸ› fix lifetime for page.endtime values
  • Loading branch information
lochmueller authored Jul 17, 2023
2 parents ddd51b7 + 48b0bac commit a1cffe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Middleware/GenerateMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ protected function calculateLifetime(TypoScriptFrontendController $tsfe): int
$timeOutTime = $tsfe->get_cache_timeout();

// If page has a endtime before the current timeOutTime, use it instead:
if ($tsfe->page['endtime'] > 0 && $tsfe->page['endtime'] < $timeOutTime) {
$endtimeLifetime = $tsfe->page['endtime'] - time();
if ($tsfe->page['endtime'] > 0 && ($tsfe->page['endtime'] - $GLOBALS['EXEC_TIME']) < $timeOutTime) {
$endtimeLifetime = $tsfe->page['endtime'] - $GLOBALS['EXEC_TIME'];
if ($endtimeLifetime > 0) {
$timeOutTime = $endtimeLifetime;
}
Expand Down

0 comments on commit a1cffe0

Please sign in to comment.