[BUGFIX] Resolve cached URLs through the cache frontend - #56
Open
davidsteeb wants to merge 1 commit into
Open
davidsteeb wants to merge 1 commit into
davidsteeb wants to merge 1 commit into
Conversation
Since 5.0.1 resolveCachedUrl() reads entries via the backend's own get(), which returns the HMAC-signed serialization written by the VariableFrontend instead of the URL. Providers cannot parse a host from it, so flushByTag()/flushByTags() purged nothing when content was saved; only flush() worked, as it does not need the URLs. Keep a reference to the frontend in setCache() and resolve URLs through it. Plain URLs from rows written before 5.0.0 still work through the existing fallback.
bmack
approved these changes
Sep 25, 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.
Since 5.0.1,
ReverseProxyCacheBackend::resolveCachedUrl()reads entries via the backend's ownget(). That returns the HMAC-signed serialization written by theVariableFrontend(s:35:"https://…";<hmac>) instead of the URL.Providers cannot parse a host from that string.
CloudflareClientfilters it out and sends no request at all, soflushByTag()/flushByTags()purge nothing when content is saved, and nothing is logged.flush()is unaffected becausepurgeEverything()does not need the URLs.The regression came with 20164d6, which replaced
$this->cache->get()with$this->get().Change
setCache()and resolve URLs through it.Verification (TYPO3 v14.3)
resolveCachedUrl()returns the signed blob,parse_url()yields no host, and the URL is missing fromgetAllCachedUrls().flushByTags()hands both tagged URLs to the provider.