-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Revisit MemoryCache design #36556
Copy link
Copy link
Closed as not planned
Milestone
Description
The current design of MemoryCache is awkward due to the IMemoryCache interface where ICacheEntry CreateEntry(object key) exists instead of a more intuitive Set(object key, object value). The expected usage pattern is to call Dispose() on the ICacheEntry to "commit" the entry to the cache but this is unintuitive as well. This proved to be an issue when attempting to implement a strategy based eviction trigger and strategy in aspnet/Caching#280. We should revisit this design and see if there are possible improvements.
Reactions are currently unavailable