feat(storage): add purge_cache and purge_bucket_cache canonical capabilities#44
Open
grdsdev wants to merge 5 commits into
Open
feat(storage): add purge_cache and purge_bucket_cache canonical capabilities#44grdsdev wants to merge 5 commits into
grdsdev wants to merge 5 commits into
Conversation
Registers two new canonical storage capabilities sourced from supabase/supabase-js#2429: - storage.file_buckets.purge_cache — invalidate CDN cache for a single object via StorageFileApi.purgeCache(path) - storage.file_buckets.purge_bucket_cache — invalidate CDN cache for an entire bucket via StorageBucketApi.purgeBucketCache() Both require a service_role JWT and the purgeCache tenant feature.
Adds human-readable specs for the two new CDN cache purge capabilities: - specs/storage/file_buckets/purge_cache.md - specs/storage/file_buckets/purge_bucket_cache.md Covers the HTTP endpoint, behavioral contract, service_role requirement, purgeCache tenant feature prerequisite, error conditions, and cross-links.
QuintinWillison
left a comment
Member
There was a problem hiding this comment.
It's nice to see capabilities being added, resulting in a much smaller PR diff, much easier on the eyes for the human reviewers! 💪 ... just a couple of thoughts/questions...
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.
Summary
storage.file_buckets.purge_cache— invalidate CDN cache for a specific object in a bucket (StorageFileApi.purgeCache(path))storage.file_buckets.purge_bucket_cache— invalidate CDN cache for all objects in a bucket (StorageBucketApi.purgeBucketCache())Why
These capabilities were introduced in supabase/supabase-js#2429 and are now registered here as canonical features so SDK compliance files can reference them.
Notes for reviewers
service_roleJWT — anon/user JWT calls are rejected by the storage server.purgeCachetenant feature to be enabled (self-hosted deployments also needCDN_PURGE_ENDPOINT_URLconfigured).file_bucketsgroup, consistent with the other file-level operations.npm run validate) and the full test suite (125 tests) pass with no changes.