5

Is there any way that I can list the pages which are currently stored in the OutputCache?

Just a list of paths would do, but if there's a way to get more information about each item (expiry etc), then all the better.

Mark Bell
  • 28,985
  • 26
  • 118
  • 145

3 Answers3

2

As far as I remember Cache is a singleton and there is only one instance of it per app domain. OutputCache uses it too and it's nothing more than just a Response.Cache. So I think cached pages should be available through the Cache (Sorry, I can't check this at the moment). And the following articles should help you in this case:
http://www.codeproject.com/KB/session/exploresessionandcache.aspx
http://aspalliance.com/CacheManager/Default.aspx

zihotki
  • 5,201
  • 22
  • 26
2

Here is a little tool I wrote that will let you to view the contents of your Cache. You can also view the dependencies on a file and remove the cache.

https://github.com/azamsharp/WIYC

Daniel Lo Nigro
  • 3,346
  • 27
  • 29
azamsharp
  • 19,710
  • 36
  • 144
  • 222
  • Useful tool! I went with zihotki's answer because I really wanted to see _how_ to do it and your source code isn't currently available, but thanks. – Mark Bell Feb 28 '10 at 08:42
  • @Mark B Thanks! Yeah I am not sure where I put the source code. It just vanished! :( – azamsharp Feb 28 '10 at 18:14
  • Here's a working link: https://github.com/azamsharp/WIYC. I've confirmed it works on ASP.NET 4.0 if you compile WIYCLibrary and then edit Web.config to add the HTTP handler (as specified in WebDriver\Web.config) – Daniel Lo Nigro Apr 15 '12 at 01:12
0

Here is another tool that displays the Usercontrol(Webforms) cache and am extending that to display the outputcache details as well

https://github.com/chandarmk/InternalCacheHandler

Thiru
  • 407
  • 5
  • 7