HighTechTalks DotNet Forums  

cache enumeration from web page

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss cache enumeration from web page in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
vbphil
 
Posts: n/a

Default cache enumeration from web page - 04-08-2005 , 11:49 AM






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

Reply With Quote
  #2  
Old   
Alvin Bruney [MVP - ASP.NET]
 
Posts: n/a

Default Re: cache enumeration from web page - 04-08-2005 , 08:40 PM






that info isn't exposed to the outside world because of the dictionary
implementation. what you see is exactly what you get.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"vbphil" <vbphil (AT) online (DOT) nospam> wrote

Quote:
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



Reply With Quote
  #3  
Old   
vbphil
 
Posts: n/a

Default Re: cache enumeration from web page - 04-09-2005 , 08:17 AM



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

"Alvin Bruney [MVP - ASP.NET]" wrote:

Quote:
that info isn't exposed to the outside world because of the dictionary
implementation. what you see is exactly what you get.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"vbphil" <vbphil (AT) online (DOT) nospam> wrote in message
news76C01F6-BDBF-45E5-BECB-A5BC34AC28B7 (AT) microsoft (DOT) com...
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




Reply With Quote
  #4  
Old   
Alvin Bruney [MVP - ASP.NET]
 
Posts: n/a

Default Re: cache enumeration from web page - 04-09-2005 , 02:04 PM



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?

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"vbphil" <vbphil (AT) online (DOT) nospam> wrote

Quote:
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

"Alvin Bruney [MVP - ASP.NET]" wrote:

that info isn't exposed to the outside world because of the dictionary
implementation. what you see is exactly what you get.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"vbphil" <vbphil (AT) online (DOT) nospam> wrote in message
news76C01F6-BDBF-45E5-BECB-A5BC34AC28B7 (AT) microsoft (DOT) com...
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






Reply With Quote
  #5  
Old   
vbphil
 
Posts: n/a

Default Re: cache enumeration from web page - 04-09-2005 , 10:25 PM



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

"Alvin Bruney [MVP - ASP.NET]" wrote:

Quote:
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?

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"vbphil" <vbphil (AT) online (DOT) nospam> wrote in message
news:FEFFA7AF-9397-4B28-AAA2-E4603A85B08E (AT) microsoft (DOT) com...
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

"Alvin Bruney [MVP - ASP.NET]" wrote:

that info isn't exposed to the outside world because of the dictionary
implementation. what you see is exactly what you get.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"vbphil" <vbphil (AT) online (DOT) nospam> wrote in message
news76C01F6-BDBF-45E5-BECB-A5BC34AC28B7 (AT) microsoft (DOT) com...
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







Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: cache enumeration from web page - 04-10-2005 , 10:54 PM



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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.