-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix caching for Content Versioning #20153
Conversation
🦋 Changeset detectedLatest commit: 49e2dcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Or simply rephrase the sentence more generally. Could you do that right in this PR? 🙏 |
Updated via 476a62d 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 🥇 Looks & works fine!
Scope
What's changed:
Ensured cache value contains content version values when
version
query parameter is usedPreviously the
version
query param augments the payload aftersetCacheValue
is called, so the cached data is actually incorrect. This PR ensures the augmentation happens before the cache is saved.Added auto cache purging for Content Version saves
Uses the same code over here:
directus/api/src/services/utils.ts
Lines 129 to 134 in d9736d0
which was added in Add Auto Cache Purging to Sorting Utility #19115.
Potential Risks / Drawbacks
Review Notes / Questions
Partially unrelated, but should we mention both Content Version saves and also util sort (by Add Auto Cache Purging to Sorting Utility #19115) in the description here:
directus/docs/self-hosted/config-options.md
Line 483 in b0c166f
Fixes #20133