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

Api: Clear system cache only if specified on /utils/cache/clear #22234

Merged

Conversation

joselcvarela
Copy link
Member

Scope

We should avoid to clear schema cache as that consumes too much resources.
Because of that, the majority usage of the POST /utils/cache/clear is used to refresh data, not schema.

In this PR, we avoid clearing system cache on clear cache util endpoint.
Although, that can still be possible using the ?system query string

What's changed:

  • Clear system cache only if ?system query is passed

Potential Risks / Drawbacks

⚠️ This introduces a breaking change for people relying on this endpoint to clear system cache.
From now on, the ?system query needs to be included on the request to have the same behaviour as before

Review Notes / Questions

  • N/A

@joselcvarela joselcvarela self-assigned this Apr 17, 2024
Copy link

changeset-bot bot commented Apr 17, 2024

🦋 Changeset detected

Latest commit: be89eb3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
docs Patch
@directus/api Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rijkvanzanten rijkvanzanten merged commit 476a248 into directus:main Apr 17, 2024
5 checks passed
@github-actions github-actions bot added this to the Next Release milestone Apr 17, 2024
@joselcvarela joselcvarela deleted the api/utils/clear-system-cache-optional branch April 17, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants