Need Help Determining Cache Size Programmatically

Topics: Caching Application Block
Dec 23, 2008 at 2:25 PM
Edited Dec 23, 2008 at 2:29 PM
I am currently in the process of implementing caching on a ASP.NET application. Is it possible to determine how large (bytes in memory) the CurrentCacheState is using the functions included in the Microsoft.Practices.EnterpriseLibrary.Caching namescape? I.e., I do not want to have to write code to retrieve the CurrentCacheState object, iterate through the HashTable object and find the aggregate memory consumed by this object.

Any help would be greatly appreciated.
Dec 24, 2008 at 4:07 PM

Looking through the documentation, it seems that there are no available method at the Microsoft.Practices.EnterpriseLibrary.Caching namespace that will suit your need. Maybe you'll have to write your own code to retrieve the size that was consumed.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.