You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
Description
Currently the
QueryCachingMiddleware
buses cache based on theLastEdited
date - but if the query includes versioned records, and something was deleted after theLastEdited
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
silverstripe-graphql/src/Middleware/QueryCachingMiddleware.php
Line 115 in 7684d15
Notes
The text was updated successfully, but these errors were encountered: