aspnetcore
aspnetcore copied to clipboard
Metrics for caching
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Caching is a largely invisible operation. It's useful to have metrics to observe what is happening with caching.
Describe the solution you'd like
Caching has many APIs and usages in ASP.NET Core. See https://learn.microsoft.com/en-us/aspnet/core/performance/caching/overview?view=aspnetcore-8.0
- In-memory caching
- Distributed caching
- Output caching
- Response caching
Find the most useful places to add metrics. Note that we should try to design metrics so that all implementations of a cache benefit. For example, all distributed caching implementations get metrics, rather than just Redis and leaving SQL Server cache out.
Additional context
No response
FYI @mgravell (part of caching epic) @eerhardt