Closed thompson-tomo closed 2 months ago
Tagging subscribers to this area: @dotnet/area-extensions-caching See info in area-owners.md if you want to be subscribed.
Author: | thompson-tomo |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `untriaged`, `area-Extensions-Caching` |
Milestone: | - |
Is CacheItem a view of a CacheEntry? What's ProviderName and StorageType? Can you be more specific about the extension method you are proposing here? In which static type will it live?
This issue has been marked needs-author-action
and may be missing some important information.
@thompson-tomo if you want to know what happens with the IMemoryCache
object, why don't you just create a simple decorator for it that intercepts the calls and stores the information you need before/after each method is executed?
From your description, introspection on the calls (and callbacks) should be enough to be able to provide a "view" of the cache.
Also, instead of viewing the entire state of the cache, I believe it would be better to have metrics around the cache so that you could graph them in observability tools.
This issue has been automatically marked no-recent-activity
because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity
.
This issue will now be closed since it had been marked no-recent-activity
but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
Background and motivation
I like what has been done with #36554 however for me it is not enough to be able to implement an actuator to provide information about the cache as done in spring boot.
I would like the method to be available as part of the interface so that i have a consistent way to get the keys and the metadata regardless of the provider.
API Proposal
Interface extension
new class
API Usage
Alternative Designs
Risks
Should be low risk as not a breaking change by providing default implementation.