fix: Clear Fusion caches when translation overrides are updated#23
Merged
mficzel merged 3 commits intositegeist:mainfrom Jan 29, 2026
Merged
fix: Clear Fusion caches when translation overrides are updated#23mficzel merged 3 commits intositegeist:mainfrom
mficzel merged 3 commits intositegeist:mainfrom
Conversation
When updating translation overrides via the Neos backend module, the package was only clearing its own translation cache but not the Fusion caches where translated content is rendered. This caused stale translations to persist in the frontend until caches were manually flushed, particularly affecting components like CookieConsent that use CsvPO translations in Fusion prototypes. Changes: - Inject CacheManager into TranslationLabelSource - Modified flushCaches() to also flush Neos_Neos_Fusion cache - Modified flushCaches() to also flush Neos_Fusion_Content cache - Added inline documentation explaining why Fusion caches need clearing The fix ensures that when translations are updated through: - TranslationController::addOverrideAction() - TranslationController::saveOverrideAction() - TranslationController::deleteOverrideAction() The rendered Fusion content using those translations is regenerated on the next request, making translation changes immediately visible in the frontend. Fixes cache invalidation for Fusion prototypes using CsvPO translations
mficzel
requested changes
Jan 16, 2026
Member
mficzel
left a comment
There was a problem hiding this comment.
I agree to flushing Neos_Fusion_Content but wonder why the Neos_Neos_Fusion is flushed aswell. I may be wrong but as far as i am aware this stores the fusion not the evaluated result so it only has to be flushed when fusion files change.
Also Triggering a full fusion cache flush with every edit is quite a hard gun. I would prefer to have a configuration for that to disable it quickly if it causes trouble.
…d targeted Addresses review feedback from mficzel on PR sitegeist#23: 1. Remove Neos_Neos_Fusion cache flush: - This cache stores parsed Fusion AST, not rendered content - Only needs flushing when Fusion files change, not when translations change 2. Keep only Neos_Fusion_Content cache flush: - This cache stores rendered/evaluated content that includes translations - Needs flushing when translations change to regenerate content 3. Make cache flush configurable: - Add new setting: management.flushNeosFusionContentCacheOnTranslationUpdate - Defaults to false to prevent performance issues - Allows disabling if cache flush causes trouble in production Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Address PHP CodeSniffer violations: - Move first expression after opening parenthesis to new line - Place closing parenthesis on separate line before opening brace This follows PSR12 standards for multi-line control structures. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Author
|
@mficzel i fixed the code-style, so the checks passed 🎉 |
mficzel
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When updating translation overrides via the Neos backend module, the package was only clearing its own translation cache but not the Fusion caches where translated content is rendered.
This caused stale translations to persist in the frontend until caches were manually flushed, particularly affecting components like CookieConsent that use CsvPO translations in Fusion prototypes.
Changes
Core Implementation
Configuration
management.flushNeosFusionContentCacheOnTranslationUpdatefalseto prevent performance issues on high-traffic sitesDocumentation
How it Works
The fix ensures that when translations are updated through:
The rendered Fusion content using those translations is regenerated on the next request (if enabled), making translation changes immediately visible in the frontend.
Addresses Review Feedback
This PR has been updated based on @mficzel's review:
Neos_Neos_Fusioncache flush (stores parsed Fusion AST, not content)@mficzel