Prevent proxy cache key fan-out - #4
Merged
Merged
Conversation
TorstenDittmann
marked this pull request as draft
August 12, 2026 15:10
Greptile SummaryThe PR prevents cache-key purge fan-out across unrelated Fastly services or Cloudflare zones by rejecting non-empty key purges through the domain-routing proxy.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into agent/cloudflar..." | Re-trigger Greptile |
TorstenDittmann
marked this pull request as ready for review
August 13, 2026 14:17
Meldiron
added a commit
that referenced
this pull request
Aug 13, 2026
Cache\Adapter\Proxy hard-codes one deployment's routing into the library: an app domain, a set of network domains, and a list of adapters for everything else. Any consumer whose split is not exactly that cannot use it, and a consumer whose split is that has encoded its topology in a dependency it does not control. #4 has since established that it cannot route key purges at all, since keys are scoped to a service or zone, and told consumers to select the adapter themselves before constructing Cache. That is the same conclusion for every operation, not only keys. Nothing uses it. Its only references were its own test and the README. Certificates\Provider\Proxy is untouched; this removes the cache adapter only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What changed
purgeKeys()calls made through the cacheProxy.Cache.Why
Cache keys and tags are scoped to a specific Fastly service or Cloudflare zone. The proxy has only domain-routing configuration and no application Rule context, so broadcasting a key purge to every configured adapter can invalidate unrelated services or zones.
After this change, applications select the appropriate adapter using their own routing context and pass that adapter directly to
Cache.Impact
Callers using
Proxy::purgeKeys()with non-empty keys now receive anUnsupportedOperationexception instead of an implicit fan-out. DirectFastlyandCloudflareadapter key purges are unchanged.Validation