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
Add a method to the cache interface for checking whether a resources should be considered to be "complete" based on the current cache's config and impl detail.
Problem
Right now while consuming the cache a common practice is to try the cache and fallback to making a REST request if possible due to the complex nature of whether a resource will be "complete" or not.
This method provide a uniform easy way to introspect the cache to work out whether falling back to rest should be necessary for a resource or not (without having to dive into impl detail of the cache yourself) since for an internally "complete" resource a None return means the entry doesn't exist unlike incomplete cache stores.
This should help with resources like the following resources where the completeness of the store will come down to internal configuration
Invites
Members
Possibly presences
Thread members
With the following resources always being incomplete and thus always returning False
Messages
Users
DM Channel IDs
Integrations (if they're ever added to the cache interface)
Ideal implementation
A method on the cache interface for checking whether a resource should be considered to be "complete", this should account for the enabled cache components along with other impl specific configuration for that cache (e.g. the member cache mode once #878 is implemented).
Checklist
I have searched the issue tracker and have made sure it's not a duplicate.
If it is a follow up of another issue, I have specified it.
The text was updated successfully, but these errors were encountered:
Summary
Add a method to the cache interface for checking whether a resources should be considered to be "complete" based on the current cache's config and impl detail.
Problem
Right now while consuming the cache a common practice is to try the cache and fallback to making a REST request if possible due to the complex nature of whether a resource will be "complete" or not.
This method provide a uniform easy way to introspect the cache to work out whether falling back to rest should be necessary for a resource or not (without having to dive into impl detail of the cache yourself) since for an internally "complete" resource a None return means the entry doesn't exist unlike incomplete cache stores.
This should help with resources like the following resources where the completeness of the store will come down to internal configuration
With the following resources always being incomplete and thus always returning False
Ideal implementation
A method on the cache interface for checking whether a resource should be considered to be "complete", this should account for the enabled cache components along with other impl specific configuration for that cache (e.g. the member cache mode once #878 is implemented).
Checklist
If it is a follow up of another issue, I have specified it.
The text was updated successfully, but these errors were encountered: