95742[BUGFIX] Skip stdWrap cache write if caching is disabled
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Wouter Wolters +1
- Ayke Halder +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Benni Mack +2
- Ayke Halder +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 3
Review log 1113
-
Georg Ringer uploaded patch set 1 09/09/26, 06:21
-
Georg Ringer commented on patch set 1 09/09/26, 06:21
This change is ready for review. -
core-ci voted on patch set 1 V +1 09/09/26, 06:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108143
-
Markus Klein voted on patch set 1 CR +1 09/09/26, 14:00
-
Ayke Halder commented on patch set 1 CR +1 09/09/26, 14:03
Everything works perfectly now. Unfortunately I cannot reproduce my poisened cache case without this patch applied in TYPO3 main anymore… still trying.ContentObjectRendererStdWrapCacheTest.php:70```suggestion } #[Test] public function cacheReadGetsExistingCachedContentAndDoesNotChangeCacheIfCachingIsAllowed(): void { $subject = $this->get(ContentObjectRenderer::class); $subject->setRequest($this->createRequest(new CacheInstruction())); $this->get(CacheManager::class)->getCache('hash')->set('myCacheKey', ['content' => 'cachedContent', 'cacheTags' => []]); self::assertSame('cachedContent', $subject->stdWrap('voidContent', ['cache.' => ['key' => 'myCacheKey']])); self::assertSame('cachedContent', $this->get(CacheManager::class)->getCache('hash')->get('myCacheKey')['content']); } #[Test] public function cacheReadDoesNotGetExistingCachedContentAndDoesNotChangeCacheIfCachingIsDisabled(): void { $cacheInstruction = new CacheInstruction(); $cacheInstruction->disableCache('Test: Disabled cache due to enabled frontend.preview aspect isPreview.'); $subject = $this->get(ContentObjectRenderer::class); $subject->setRequest($this->createRequest($cacheInstruction)); $this->get(CacheManager::class)->getCache('hash')->set('myCacheKey', ['content' => 'cachedContent', 'cacheTags' => []]); self::assertSame('previewContent', $subject->stdWrap('previewContent', ['cache.' => ['key' => 'myCacheKey']])); self::assertSame('cachedContent', $this->get(CacheManager::class)->getCache('hash')->get('myCacheKey')['content']); } ``` May we add these two additional tests to check the cache reading side? -
Georg Ringer uploaded patch set 2
CR +1V +109/09/26, 14:20 -
core-ci voted on patch set 2 V +1 09/09/26, 14:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108192
-
Ayke Halder commented on patch set 2 CR +1 V +1 09/09/26, 15:04
Works perfectly with this patch applied! And I could reproduce the issue in current main without this patch - see https://forge.typo3.org/issues/110602#issue_description_wikiContentObjectRendererStdWrapCacheTest.php:70ReplyDone -
Wouter Wolters voted on patch set 2 CR +1 09/09/26, 15:22
-
Simon Schaufelberger voted on patch set 2 CR +1 V +1 09/09/26, 22:43
-
Ayke Halder commented on patch set 2 09/11/26, 15:11
Does this also need a backport to v13 as priority bugfix? -
Benni Mack commented on patch set 2 CR +2 V +2 10/02/26, 16:29
no 13.4 -
Benni Mack merged patch set 3 10/02/26, 16:29