Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / April 2005

Tip: Looking for answers? Try searching our database.

cache enumeration from web page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vbphil - 08 Apr 2005 16:49 GMT
I'm caching aspx pages and ascx controls as well as programmatically within
aspx code for my asp.net web application. I'd like to have a special admin
aspx page that will display the contents of the cache. I'm using the
IDictionaryEnumerator, see code snippet below, but this just gets me the
value or data type and the key of the items entered programmatically.

Here's the question. I'd like more information, such as when it was added
and when it will expire, also, what pages and controls are in the cache and
when they will expire. How do I do this?

..........
If nCacheCount > 0 Then
Dim CacheEnum As IDictionaryEnumerator = Cache.GetEnumerator()
While CacheEnum.MoveNext()
    drCache = dtCache.NewRow()
    drCache("name") = CacheEnum.Key
    drCache("value") = CacheEnum.Current.Value.ToString()
    drCache("na") = ""
    dtCache.Rows.Add(drCache)
End While
...............

thanks,  -phil
Alvin Bruney [MVP - ASP.NET] - 09 Apr 2005 01:40 GMT
that info isn't exposed to the outside world because of the dictionary
implementation. what you see is exactly what you get.

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc

> I'm caching aspx pages and ascx controls as well as programmatically
> within
[quoted text clipped - 21 lines]
>
> thanks,  -phil
vbphil - 09 Apr 2005 13:17 GMT
Thanks Alvin. Ok then, how about a tool of some sort for the IIS
Administrator that would expose this cache information locally to the
console? Secondly, what is the appropriate counter to moitor through the
performance counter that would reveal cache usage?

Regards,  -phil

> that info isn't exposed to the outside world because of the dictionary
> implementation. what you see is exactly what you get.
[quoted text clipped - 24 lines]
> >
> > thanks,  -phil
Alvin Bruney [MVP - ASP.NET] - 09 Apr 2005 19:04 GMT
Well, if a tool can do it then user code can do it. That isn't the case. In
any case, a tool runs outside of the executing process which definitely does
not have access to the cache instance. I'm not aware of any counter that
monitors cache usage, counters can measure memory usage which is directly
dependent on cache usage. What exactly are you after? Are you having memory
issues?

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc

> Thanks Alvin. Ok then, how about a tool of some sort for the IIS
> Administrator that would expose this cache information locally to the
[quoted text clipped - 34 lines]
>> >
>> > thanks,  -phil
vbphil - 10 Apr 2005 03:25 GMT
I had issues early on with properly saving data in the cache the way I
wanted. I desired a tool to inspect the cache to help analyze what was
happening. Having solved the issues I was left with the curiosity of how to
inspect the cache. Thanks for your time and setting me straight.  -phil

> Well, if a tool can do it then user code can do it. That isn't the case. In
> any case, a tool runs outside of the executing process which definitely does
[quoted text clipped - 41 lines]
> >> >
> >> > thanks,  -phil
[MSFT] - 11 Apr 2005 03:54 GMT
In ASP.NET performance monitor countors, there are some like "Cache API hit
Rate" and "Cache Total entries". But they cannot go to the detals like when
a cached object was added and expired.

Luke

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.