81930[BUGFIX] Respect endtime of page when calculating the lifetime
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Benjamin Franzke +1
-
Verified V +2 Done
- Benni Mack +2
- Benjamin Franzke +1
- core-ci +1 CI
Issues 2
Files 1
Review log 1724
-
Sascha Nowak uploaded patch set 1 11/23/23, 16:12
-
core-ci voted on patch set 1 V +1 11/23/23, 16:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49756
-
core-ci commented on patch set 1 11/23/23, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49794
-
Andreas Wolf commented on patch set 1 11/23/23, 18:55
Restrict => respect?… sets the lifetime …CacheLifetimeCalculator.php:54calculateLifetimeForRow_%s_%dModifyCacheLifetimeForRowEvent.php:29These could be public and we could drop the getters then, right? -
Benni Mack commented on patch set 1 11/24/23, 08:04
ModifyCacheLifetimeForRowEvent.php:24can't we re-use the already existing ModifyCacheLifetimeForPageEvent? -
Sascha Nowak commented on patch set 1 11/24/23, 08:31
ModifyCacheLifetimeForRowEvent.php:24ReplyThe ModifyCacheLifetimeForPageEvent does not have a tablename. Identifying the object you can manipulate is not possible. What do you think about deprecating the ModifyCacheLifetimeForPageEvent and use only the new ModifyCacheLifetimeForRowEvent? -
Sascha Nowak uploaded patch set 2
V +111/24/23, 08:33 -
Benni Mack commented on patch set 2 11/24/23, 08:34
ModifyCacheLifetimeForRowEvent.php:24ReplyIf your plan is to add this change to v12, then adding a new Event (= a new feature) is usually not an option. If we're going v13 only, I could imagine keeping both events (I use the existing Event actually and its position and place is quite useful as it is at the very end). -
Sascha Nowak commented on patch set 2 11/24/23, 08:57
ModifyCacheLifetimeForRowEvent.php:24ReplyThanks for your input. I will rework this change and only fix the bug in this change and add the event as feature in a separate change for v13. -
Sascha Nowak uploaded patch set 3 11/24/23, 09:09
-
core-ci voted on patch set 3 V +1 11/24/23, 09:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49848
-
core-ci voted on patch set 2 V -1 11/24/23, 09:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49839
-
Benni Mack commented on patch set 3 CR +1 11/27/23, 08:15
Reply
DoneReply
DoneCacheLifetimeCalculator.php:54ReplyDoneModifyCacheLifetimeForRowEvent.php:24ReplyDoneModifyCacheLifetimeForRowEvent.php:29ReplyDone -
Christian Kuhn updated the commit message in patch set 4
CR +1V +111/27/23, 11:32 -
Christian Kuhn voted on patch set 4 CR +1 V +1 11/27/23, 11:32
-
core-ci voted on patch set 4 V +1 11/27/23, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49980
-
Benjamin Franzke commented on patch set 4 CR -1 11/30/23, 14:19
on it. Two things im unsure about: 1) I see some seconds offsets in expires and max-age header, e.g.: expires: Thu, 30 Nov 2023 14:10:43 GMT While I'd expect this to always be normalized to the start of the minute (as configured in backend and even stored in the database): expires: Thu, 30 Nov 2023 14:10:00 GMT Looks like we fail to normalize (later) – so basically ACCESS_TIME doesn't work here. I guess you picked ACCESS_TIME from the code below. But the comment of that code "It is ok that we do not take seconds into account here because" simply seems to be a wrong promise. (Did I mention I hate (such) comments for exactly those reasons? :) They can never be trusted.) It would work if we'd use EXEC_TIME. Sorry, I need to "understand" this is order to fix this "properly" in order to avoid caching too long (up to 60 seconds) 2) The record-entime checker adds +1 to the timedifference, with a strange justification that "fears" basically not to regenerate content when the page is requested on the last cache-second: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81930/4/typo3/sysext/frontend/Classes/Cache/CacheLifetimeCalculator.php#117 Well, IMO that'd actually be the correct behaviour (last second should still be cached), so I'd like to check that, in order to implement "endtime" algorithms that are aligned between pages and content records.than -
Benjamin Franzke uploaded patch set 5
CR +1V +111/30/23, 14:44 -
Benjamin Franzke commented on patch set 5 11/30/23, 14:45
Reply
Ok, So ACCESS_TIME is used by the record-endtime-checker in order to "normalize" the queries for the database (in order for the mysql query cache to work in case multiple requests are processed in one second). so ACCESS_TIME really isn't the right tool for our case, becasue the resulting cache-timeout will be calculated based on EXEC_TIME: https://github.com/TYPO3/typo3/blob/594c1cd43afe2f052faa4ec092e04b94658ee889/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php#L2211 So I switched to patch to use EXEC_TIME. The record-endtime-cachetimeout calculation still looks fishy to me, but that's something for a separate change, so I'd say: let's merge.Reply
Done -
core-ci voted on patch set 5 V +1 11/30/23, 14:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50170
-
Benjamin Franzke uploaded patch set 6
CR +1V +111/30/23, 15:52 -
core-ci voted on patch set 6 V +1 11/30/23, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50174
-
Benni Mack voted on patch set 6 CR +2 V +2 11/30/23, 17:05
-
Benni Mack merged patch set 7 11/30/23, 17:05