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 / September 2004

Tip: Looking for answers? Try searching our database.

Cache information

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GrantMagic - 28 Sep 2004 12:34 GMT
I am currently trying to gather all information on my cache collection.

I am looping through the System."Collection.DictionaryEntry" class looking
for all the information i can get.
Currently i only seem to be able to get the Key and the Value.

Ultimately i am looking for:
   The datetime the Cache was created
   The datetime it was last accessed
   The datetime it is set to expire
   The sliding expiration time
   The size of the cache
And any other information available.

IS this possible, is there another class i should be using or is their a way
to use the DictionaryEntry class i am not aware of

Thanks in advance

Grant
Alvin Bruney [MVP] - 29 Sep 2004 01:25 GMT
the dictionary cache only understands key value relationships. you cannot
glean that kind of information from the dictionary. i'm curious as to why
you need this information since the cache
is internally managed. i'd suggest you wrap the cache in a class and log
that info whenever you set the cache with data if you need to manage the
cache

Signature

Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok

>I am currently trying to gather all information on my cache collection.
>
[quoted text clipped - 16 lines]
>
> Grant
GrantMagic - 29 Sep 2004 10:41 GMT
Hi Alvin

I am currently running a number of web sites. I obviously use the cache to
store commonly used data.
When i make changes, i clear that cache to update it.
I was under the impression that i would not need to clear that cache, if it
wasn't used for a specified time - the time set by me in the TimeSpan

Currently i am inserting in to the Cache as follows:
   Cache.Insert("SubnavForm", subnavForm, null, DateTime.MaxValue,
TimeSpan.FromMinutes(20));

However, after a full night of know use, the cache was not updated.
When i cleared the Cache by looping through the Collections.DictionaryEntry
collection, the Cache was then updated.
I wanted this information, to monitor my cache and find out why it was not
being cleared.

> the dictionary cache only understands key value relationships. you cannot
> glean that kind of information from the dictionary. i'm curious as to why
[quoted text clipped - 23 lines]
>>
>> Grant
Alvin Bruney [MVP] - 29 Sep 2004 19:46 GMT
i don't see your callback function in there to reload the cache.
you need to point the cache to a callback function which reloads the cache
when the time expires.
makes sense?

Signature

Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok

> Hi Alvin
>
[quoted text clipped - 41 lines]
>>>
>>> Grant
GrantMagic - 30 Sep 2004 09:40 GMT
ok, that makes perfect sense thank you.

still don't understand why you can't get comprehensive information from you
current cache

>i don't see your callback function in there to reload the cache.
> you need to point the cache to a callback function which reloads the cache
[quoted text clipped - 46 lines]
>>>>
>>>> Grant

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.