How to determine the size of an ASP.net Cache Item?
I know that its possible to get the total size of the ASP.net Cache (How to determine total size of ASP.Net cache?)
But is it possible to break down the that total into the开发者_如何学C individual items stored in cache?
Thanks for your help!
If you just need a one off report then you can serialize each object that is returned and count the bytes.
Dim Stream As New IO.MemoryStream
Dim FM As New LosFormatter
FM.Serialize(Stream, Myobject)
dim O as object = Stream.ToArray
Trace.Write(O.length) 'The size of the object that you want to measure
精彩评论