views:

60

answers:

2

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.

+1  A: 

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
+2  A: 

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.

http://azamsharp.com/Posts/140_SharpSessionCacheManager__What_s_in_your_Cache_.aspx

azamsharp
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 B
@Mark B Thanks! Yeah I am not sure where I put the source code. It just vanished! :(
azamsharp