Closed Foxtrek64 closed 2 months ago
I personally think that you need to get back a bunch of cache keys as a list, it should be stored as a list to begin with. This design also introduces complexity in providers, such as Redis, as there'd be a hefty penalty to scanning across the entire cache to return all applicable results (and, if this were to be implemented, it should be IAsyncEnumerable for this purpose)
I'm in agreement with Velvet here - I don't think this is the way to go, especially considering a cache's opaque key-value store nature. I'd be open to revisiting this if more compelling use cases show up, but for now I'm closing as wontfix.
Description
As it says on the tin, we should be able to pull all instances of a key type rather than just a specific key.
Why This is Needed
I am using the CacheService for purposes outside of Discord, and I need to get all instances of tracked files to iterate through them and figure out if they've been processed yet.
Alternatives Considered
My original implementation relied on using a MemoryCache directly, but I like Remora's caching implementation.
Additional Details
No response