views:

143

answers:

1

hi,

  • i am really struggling finding the best solution, what is really confusing me is as long as .net framework purges low priority cached items why should i worry about memory ( i know it is a dump question) ?

  • can i really constrain an ASP.net Caching to use certain amount of RAM, not from IIS cause my site is on shared hosting, also what that affect on caching ?

  • would static classes make better use for some situations ?

thanks in advanced.

+1  A: 

Sadly, the memoryLimit attribute on the processModel configuration element is only allowed to be set at the machine level (in machine.config) - and the way config files work, there's no way to say "this is the maximum memory any one app can have, but they can ask for less if they want".

IF you're finding that things are constantly spooling out of your cache, should they really be in there? You're either not reading them often enough to bother caching them in the first place, or your trying to put too much stuff into cache at once.


Cache spooling can be seen with the built in Performance Monitors. Under ASP.NET Applications and ASP.NET Apps v2.0.50727 you can find things like:

  • Cache API Trims
  • Cache API Turnover Rate
  • Cache Total Trims
  • Cache Total Turnover Rate

More details can be found on TechNet.

Zhaph - Ben Duguid
man, what is a tool to test spooling of cache as you said ?