简体   繁体   English

如何查看 HttpContext.Cache 中的内容

[英]How can I see what's in my HttpContext.Cache

Are there any good tools to see how much data (or even better the values of that data) is in my HttpContext.Cache ?有没有什么好的工具可以查看我的HttpContext.Cache中有多少数据(甚至更好的是该数据的值)?

Isis is a control panel for ASP.NET applications that allows easy visibility into the application's assemblies (debug or not), logging, errors, cache , session, performance counters, and more. Isis是 ASP.NET 应用程序的控制面板,可以轻松查看应用程序的程序集(调试与否)、日志记录、错误、缓存、session、性能计数器等。 ( You have to compile it from source. ) (你必须从源代码编译它。)

CacheManager although quite old - it just works. CacheManager虽然很老 - 它只是工作。

Edit: Based on CacheManager i wrote my own implementation, where i use Jayrock.Json to visualize data values of complex types / lists as a readable json.编辑:基于 CacheManager 我编写了自己的实现,我使用 Jayrock.Json 将复杂类型/列表的数据值可视化为可读的 json。

Update;更新; The previous link to Scott Cate's article is gone now.之前指向 Scott Cate 文章的链接现已消失。 Since there was quite a bit of code there (which is not easy to summarize here without reproducing the entire blog), I'm updating this answer with an easier choice: Aspy由于那里有相当多的代码(如果不复制整个博客就不容易在这里总结),我用一个更简单的选择来更新这个答案: Aspy

Aspy is totally free ASP.NET Session and Cache online viewer. Aspy 是完全免费的 ASP.NET Session 和缓存在线查看器。 It can be integrated with any ASP.NET web application including ASP.NET MVC and Web API. It can be integrated with any ASP.NET web application including ASP.NET MVC and Web API. It is ready to use right after the installation.安装后即可使用。 More detailed description is available on our website:更详细的描述可在我们的网站上找到:

Available on NuGet and needs no coding at all.在 NuGet 上可用,根本不需要编码。

PM> Install-Package Aspy

Short Screencast短截屏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM