Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure cached resource from correct bucket is deleted #5861

Closed
stnguyen90 opened this issue Jul 21, 2023 · 1 comment
Closed

Ensure cached resource from correct bucket is deleted #5861

stnguyen90 opened this issue Jul 21, 2023 · 1 comment
Assignees
Labels
product / storage Fixes and upgrades for the Appwrite Storage.

Comments

@stnguyen90
Copy link
Contributor

stnguyen90 commented Jul 21, 2023

When a file is deleted, we also delete it from the cache, but it looks like we look for cached resources based on resource:

Query::equal('resource', [$this->args['resource']]),

which is just a file ID:

->label('cache.resource', 'file/{request.fileId}')

The problem with this is if a file has the same ID in multiple buckets, they'll also be deleted.

Originally posted by @stnguyen90 in #5698 (comment)

@eldadfux
Copy link
Member

Fix was merged and will be released in the next Appwrite version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product / storage Fixes and upgrades for the Appwrite Storage.
Projects
None yet
Development

No branches or pull requests

3 participants