81801[FEATURE] Introduce CacheDataCollector API
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Guido Schmechel +1
- Torben Hansen +1
- Stefan Bürk +1
- Christian Kuhn +1
- Sascha Nowak +1
- Benni Mack +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Guido Schmechel +1
- Torben Hansen +1
- Stefan Bürk +1
- Christian Kuhn +1
- Sascha Nowak +1
- core-ci +1 CI
Issues 1
Files 21
- typo3/sysext/core/Classes/Cache/Event/AddCacheTagEvent.php2new+37 −0
- typo3/sysext/core/Classes/Cache/CacheDataCollector.phpnew+87 −0
- typo3/sysext/core/Classes/Cache/CacheDataCollectorInterface.phpnew+41 −0
- typo3/sysext/core/Classes/Cache/CacheEntry.phpnew+43 −0
- typo3/sysext/core/Classes/Cache/CacheTag.phpnew+26 −0
- typo3/sysext/core/Classes/Middleware/CacheDataCollectorAttribute.php2new+81 −0
- typo3/sysext/core/Documentation/Changelog/13.3/Deprecation-102422-TypoScriptFrontendController-addCacheTags.rstnew+65 −0
- typo3/sysext/core/Documentation/Changelog/13.3/Feature-102422-CacheDataCollectorApi.rst8new+101 −0
- typo3/sysext/core/Tests/Unit/Cache/CacheDataCollectorTest.phpnew+127 −0
- typo3/sysext/core/Tests/Unit/Cache/CacheTagTest.php2new+46 −0
- typo3/sysext/core/Tests/Unit/Middleware/CacheTagsAttributeTest.php4new+45 −0
- typo3/sysext/frontend/Classes/Cache/CacheLifetimeCalculator.php+44 −14
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+13 −4
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php2+70 −47
- typo3/sysext/frontend/Classes/Event/ModifyCacheLifetimeForRowEvent.phpnew+31 −0
- typo3/sysext/frontend/Classes/Middleware/CacheTimeout.php2new+51 −0
- typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php+7 −2
- typo3/sysext/frontend/Configuration/RequestMiddlewares.php+19 −0
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php+25 −18
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php+14 −0
Show 1 more file
Review log 77114
Show 5689 earlier messages
-
Sascha Nowak uploaded patch set 1 11/20/23, 14:58
-
core-ci voted on patch set 1 V -1 11/20/23, 15:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49137
-
Sascha Nowak uploaded patch set 2
V -111/20/23, 16:43 -
core-ci voted on patch set 2 V -1 11/20/23, 16:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49161
-
Sascha Nowak uploaded patch set 3
V -111/20/23, 17:13 -
core-ci voted on patch set 3 V -1 11/20/23, 17:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49167
-
Sascha Nowak marked it work in progress 11/20/23, 17:30
-
Sascha Nowak uploaded patch set 4
V -111/20/23, 17:40 -
core-ci voted on patch set 4 V -1 11/20/23, 17:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49175
-
Sascha Nowak uploaded patch set 5
V -111/20/23, 18:28 -
core-ci voted on patch set 5 V +1 11/20/23, 18:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49181
-
Sascha Nowak uploaded patch set 6
V +111/21/23, 09:34 -
Sascha Nowak marked it ready for review 11/21/23, 09:36
-
core-ci voted on patch set 6 V +1 11/21/23, 09:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49205
-
Oliver Klee updated the commit message in patch set 7
V +111/21/23, 10:09 -
core-ci voted on patch set 7 V +1 11/21/23, 10:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49208
-
Benjamin Franzke commented on patch set 7 11/21/23, 10:26
CacheTagsAttribute.php:28let's drop this comment, otherwise we'd move it into EXT:frontend, but EXT:core is fine IMOFeature-102422-CacheTagCollectorApi.rst:14their -
Sascha Nowak uploaded patch set 8
V +111/21/23, 11:39 -
Sascha Nowak commented on patch set 8 11/21/23, 11:39
CacheTagCollectorInterface.php:28ReplyDoneCacheTagsAttribute.php:28ReplyDoneFeature-102422-CacheTagCollectorApi.rst:14ReplyDone -
core-ci voted on patch set 8 V -1 11/21/23, 11:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49214
-
Sascha Nowak uploaded patch set 9
V -111/21/23, 14:48 -
core-ci voted on patch set 9 V +1 11/21/23, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49241
-
Sascha Nowak rebased onto patch set 10
V +111/21/23, 18:22 -
core-ci voted on patch set 10 V +1 11/21/23, 18:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49280
-
Benjamin Franzke commented on patch set 10 11/23/23, 15:04
CacheTagsAttribute.php:40maybe delay writing to the cache record from TSFE to this middleware, so that cacheTags definition and final usage are in a central place. Allows other middlewares to process/prevent caching etc.. -
Andreas Wolf commented on patch set 10 11/23/23, 18:49
Only wording issues apart from one thing about a mock in the tests.Feature-102422-CacheTagCollectorApi.rst:19… dependency to TSFE. … makes using …Feature-102422-CacheTagCollectorApi.rst:28… work around it. … TSFE API …Feature-102422-CacheTagCollectorApi.rst:45… Add multiple … different lifetimesFeature-102422-CacheTagCollectorApi.rst:56… Add multiple … different lifetimesFeature-102422-CacheTagCollectorApi.rst:88… lifetime, calculated from …CacheTagsAttributeTest.php:38I'm not sure if mocking the request does make sense here, since we have no security that it really works with an actual request. This is especially true since the request is not mocked in ContentObjectRendererTest.TypoScriptFrontendController.php:1439… add them to … -
Sascha Nowak rebased onto patch set 11
V +111/24/23, 08:33 -
Sascha Nowak rebased onto patch set 12 11/24/23, 09:19
-
Sascha Nowak marked it work in progress 11/24/23, 09:21
-
Sascha Nowak uploaded patch set 13 11/24/23, 09:25
-
core-ci voted on patch set 11 V -1 11/24/23, 09:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49841
-
core-ci voted on patch set 12 V +1 11/24/23, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49851
-
Sascha Nowak uploaded patch set 14 11/24/23, 09:51
-
Sascha Nowak marked it ready for review 11/24/23, 09:51
-
core-ci voted on patch set 13 V -1 11/24/23, 10:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49855
-
Christian Kuhn commented on patch set 14 12/04/23, 12:51
minor code remarks. structurally, we should chat on this since i'm working in a related area currently and we should align on how we solve things in FE.CacheTagTest.php:26/** @test */ please, see other comment below.CacheTagsAttributeTest.php:30please avoid the attribute at least for now. doing so will confuse the test-splitter for functional scripts and i think it would be good to not erode this into the codebase for now.Repository.php:39not optional, remove ? here and in handling below. -
Sascha Nowak uploaded patch set 15 08/01/24, 20:27
-
Sascha Nowak uploaded patch set 16 08/01/24, 20:32
-
Sascha Nowak commented on patch set 16 08/01/24, 20:32
CacheTagTest.php:26ReplyDoneCacheTagsAttributeTest.php:30ReplyDoneRepository.php:39ReplyDoneTypoScriptFrontendController.php:1439ReplyDone -
Sascha Nowak uploaded patch set 17 08/01/24, 20:40
-
Sascha Nowak commented on patch set 17 08/01/24, 20:40
Feature-102422-CacheTagCollectorApi.rst:19ReplyDoneFeature-102422-CacheTagCollectorApi.rst:28ReplyDoneFeature-102422-CacheTagCollectorApi.rst:45ReplyDoneFeature-102422-CacheTagCollectorApi.rst:56ReplyDoneFeature-102422-CacheTagCollectorApi.rst:88ReplyDone -
Sascha Nowak commented on patch set 17 08/01/24, 20:44
Reply
DoneCacheTagsAttributeTest.php:38ReplyDone -
Sascha Nowak commented on patch set 17 08/01/24, 20:45
CacheTagsAttribute.php:40ReplyDone -
core-ci voted on patch set 15 V -1 08/01/24, 20:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62646
-
core-ci voted on patch set 16 V -1 08/01/24, 21:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62649
-
core-ci voted on patch set 17 V -1 08/01/24, 21:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62653
-
Sascha Nowak rebased onto patch set 18
V -108/04/24, 16:23 -
core-ci voted on patch set 18 V -1 08/04/24, 16:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62833
-
Sascha Nowak uploaded patch set 19
V -108/04/24, 17:16 -
core-ci voted on patch set 19 V -1 08/04/24, 17:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62834
-
Sascha Nowak uploaded patch set 20
V -108/04/24, 17:38 -
core-ci voted on patch set 20 V -1 08/04/24, 17:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62835
-
Sascha Nowak uploaded patch set 21
V -108/04/24, 18:04 -
core-ci voted on patch set 21 V -1 08/04/24, 18:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62836
-
Sascha Nowak uploaded patch set 22
V -108/04/24, 18:21 -
core-ci voted on patch set 22 V -1 08/04/24, 18:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62837
-
Sascha Nowak uploaded patch set 23
V -108/04/24, 18:38 -
core-ci voted on patch set 23 V -1 08/04/24, 18:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62838
-
Benjamin Franzke commented on patch set 23 08/23/24, 06:57
CacheDataCollectorAttribute.php:46revisiting this one year later I noticed: let's be explicit here and name it `cacheDataCollector`, `cacheData` is not really self-explanatory -
Sascha Nowak uploaded patch set 24
V -108/26/24, 05:59 -
core-ci voted on patch set 24 V -1 08/26/24, 06:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64175
-
Torben Hansen commented on patch set 24 08/26/24, 06:26
cacheDataCollectorDeprecation-102422-CacheDataCollectorApi.rst:1Path for this file must be `typo3/sysext/core/Documentation/Changelog/13.3/`Feature-102422-CacheDataCollectorApi.rst:1Path for this file must be `typo3/sysext/core/Documentation/Changelog/13.3/` -
Sascha Nowak uploaded patch set 25
V -108/26/24, 06:43 -
Sascha Nowak commented on patch set 24 08/26/24, 06:43
Reply
DoneCacheDataCollectorAttribute.php:46ReplyDoneDeprecation-102422-CacheDataCollectorApi.rst:1ReplyDoneFeature-102422-CacheDataCollectorApi.rst:1ReplyDone -
core-ci voted on patch set 25 V +1 08/26/24, 06:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64178
-
Christian Kuhn commented on patch set 25 08/26/24, 12:51
note i'm involved here as well and will review within the next days. -
Benjamin Franzke commented on patch set 25 08/27/24, 06:21
AddCacheTagEvent.php:22In a call with lolli last week I figured we should stress that * this event is a workaround for code that has no access to the request(attribute) cacheDataCollector. * It's not an API that shall be used if the request is available * It's not an API that may be relied on to hook into/intercept cache-data generation => that would be sth. different, to be provided by the collector itself => It's really just there to allow passive cache-data signaling, without exactly knowing the current context (which we added for repositories that have no request knowledge).Deprecation-102422-CacheDataCollectorApi.rst:6The title of this RST should be sth like "TypoScriptFrontendController->addCacheTags" (otherwise it reads as if we introduce and deprecate the collector in one go) -
Sascha Nowak uploaded patch set 26
V +108/27/24, 12:11 -
Sascha Nowak commented on patch set 26 08/27/24, 12:13
AddCacheTagEvent.php:22ReplyDoneDeprecation-102422-CacheDataCollectorApi.rst:6ReplyDone -
core-ci voted on patch set 26 V -1 08/27/24, 12:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64301
-
Sascha Nowak rebased onto patch set 27
V -108/27/24, 17:56 -
core-ci voted on patch set 27 V +1 08/27/24, 18:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64345
-
Benjamin Franzke uploaded patch set 28
V +108/28/24, 09:33 -
Benjamin Franzke uploaded patch set 29 08/28/24, 09:33
-
core-ci voted on patch set 29 V -1 08/28/24, 09:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64400
-
core-ci voted on patch set 29 V +1 08/28/24, 09:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64400
-
Christian Kuhn uploaded patch set 30
V +109/13/24, 12:50 -
core-ci voted on patch set 30 V +1 09/13/24, 12:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65676
-
Christian Kuhn uploaded patch set 31
V +109/13/24, 14:25 -
core-ci voted on patch set 31 V +1 09/13/24, 14:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65689
-
Christian Kuhn uploaded patch set 32
V +109/13/24, 14:49 -
Christian Kuhn uploaded patch set 33 09/13/24, 14:50
-
Chris Müller commented on patch set 33 09/13/24, 14:56
Feature-102422-CacheDataCollectorApi.rst:18I assume, this should be a "PSR-7 request attribute" instead a "PSR-15 request attribute" (PSR-15 is request handler aka middleware)?Feature-102422-CacheDataCollectorApi.rst:53This example is the same as above.Feature-102422-CacheDataCollectorApi.rst:99It is designed to allow ...Feature-102422-CacheDataCollectorApi.rst:105Please add an empty line between caption and code. -
core-ci voted on patch set 32 V -1 09/13/24, 15:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65691
-
Christian Kuhn uploaded patch set 34 09/13/24, 15:02
-
core-ci voted on patch set 33 V -1 09/13/24, 15:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65692
-
Christian Kuhn commented on patch set 34 09/13/24, 15:05
Feature-102422-CacheDataCollectorApi.rst:18ReplyDoneFeature-102422-CacheDataCollectorApi.rst:53ReplyDoneFeature-102422-CacheDataCollectorApi.rst:99ReplyDoneFeature-102422-CacheDataCollectorApi.rst:105ReplyDone -
Christian Kuhn uploaded patch set 35 09/13/24, 15:05
-
core-ci voted on patch set 34 V +1 09/13/24, 15:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65693
-
core-ci voted on patch set 35 V +1 09/13/24, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65694
-
Christian Kuhn voted on patch set 35 CR +1 V +1 09/13/24, 15:13
-
Sascha Nowak voted on patch set 35 CR +1 V +1 09/13/24, 15:15
-
Benjamin Franzke voted on patch set 35 CR +1 V +1 09/13/24, 15:55
-
Torben Hansen voted on patch set 35 CR +1 V +1 09/13/24, 17:53
-
Christian Kuhn uploaded patch set 36
CR +1V +109/13/24, 18:56 -
Benni Mack voted on patch set 36 CR +1 09/13/24, 18:58
-
Christian Kuhn updated the commit message in patch set 37
CR +109/13/24, 18:58 -
Benni Mack voted on patch set 37 CR +1 09/13/24, 19:00
-
core-ci voted on patch set 36 V -1 09/13/24, 19:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65704
-
core-ci voted on patch set 37 V -1 09/13/24, 19:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65705
-
Christian Kuhn uploaded patch set 38
CR +1V -109/13/24, 19:07 -
core-ci voted on patch set 38 V +1 09/13/24, 19:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65706
-
Christian Kuhn voted on patch set 38 CR +1 V +1 09/13/24, 19:18
-
Torben Hansen voted on patch set 38 CR +1 V +1 09/13/24, 19:50
-
Stefan Bürk voted on patch set 38 CR +1 09/13/24, 20:16
-
Benni Mack voted on patch set 38 CR +1 09/13/24, 20:18
-
Stefan Bürk voted on patch set 38 V +1 09/13/24, 20:49
-
Benjamin Franzke voted on patch set 38 CR +1 V +1 09/14/24, 03:17
-
Guido Schmechel commented on patch set 38 CR +1 V +1 09/14/24, 05:49
Love it! -
Sascha Nowak voted on patch set 38 CR +1 V +1 09/14/24, 06:12
-
Benjamin Franzke voted on patch set 38 CR +2 V +2 09/14/24, 07:16
-
Benjamin Franzke merged patch set 39 09/14/24, 07:17
-
Andreas Kienast commented on patch set 39 09/17/24, 12:19
CacheTimeout.php:41Regression: `$cacheDataCollector->resolveLifetime()` may return PHP_INT_MAX. Adding EXEC_TIME leads to an overflow and PHP will return a float value: `9.2233720385814E+18`. Forcing an int cast however leads to `-9223372035128201216`. -
Christian Kuhn commented on patch set 39 09/30/24, 08:43
CacheTimeout.php:41Reply
CacheTagCollectorInterface.php:28