11

Possible Duplicate:
How can I see what's in my HttpContext.Cache

Something funny is happening where things I think are getting cached don't appear to be and expiration doesn't seem to be working as I expect. Is there any admin tool or code sample to view to current cache on the server. I know things like Redis has the ability to do this but not sure with the regular asp.net cache.

  • All things stored in the cache
  • When they were added
  • When they are expiring
  • How much space they are taking up (memory)

on an asp.net-MVC site?

RredCat
  • 5,259
  • 5
  • 60
  • 100
leora
  • 188,729
  • 360
  • 878
  • 1,366
  • you're referring to asp.net output caching, right? (as opposed to caching on the client) - if so, see this related SO thread: http://stackoverflow.com/questions/2343462/how-can-i-view-the-contents-of-the-asp-net-outputcache – James Manning Mar 31 '12 at 19:42
  • Point 1 is simple, by enumerating over the Cache object. Points 2 and 3 are, unfortunately, not exposed by the `System.Web.Caching.Cache` object. Point 4 is possible, but difficult. A search will reveal there are many - but no easy and reliable/accurate - ways to measure object size in memory. – Mike Guthrie Apr 04 '12 at 18:45

1 Answers1

3

Looks like that there is answer on your question or this or you can check this post

Community
  • 1
  • 1
RredCat
  • 5,259
  • 5
  • 60
  • 100