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

Bust query cache for last-deleted (or a combination of last deleted and last edited, i.e. last modified) for versioned records #554

Open
sabina-talipova opened this issue Oct 13, 2023 · 0 comments

Comments

@sabina-talipova
Copy link
Contributor

sabina-talipova commented Oct 13, 2023

Description

Currently the QueryCachingMiddleware buses cache based on the LastEdited date - but if the query includes versioned records, and something was deleted after the LastEdited date, we should probably bust the cache for that too.

QueryCachingMiddleware::getCachedResponse() could be improved to get last-deleted/modified as well for versioned records.
See

// Todo: We can get last-deleted/modified as well for versioned records

Notes

  • We may also find that this is still not sufficient - we may want a more robust way to define what is used to bust the cache here... though note that the key was already generated prior to this and may include all the things we want to include already.
  • This is a secondary layer of cache busting and may even be redundant - the $key being passed in should perhaps already include this information.
@GuySartorelli GuySartorelli changed the title TODO: Get last-deleted/modified as well for versioned records Bust query cache for last-deleted (or a combination of last deleted and last edited, i.e. last modified) for versioned records Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant