cached items disappearing
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngescalate' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Tim Mackey
hi folks,
i posted a message on ngcache, about why my treeview user control was being
lost out of the cache.
there are no dependencies. it has its output caching set to 999999.
after 10 mins of no activity, it gets removed from the cache.

a member on ngcache reckoned this was because .net decided after a set time
of not being accessed, it wasn't important to cache it anymore. 'I' would
like to decide whether its important or not! that's what the 9999999 means!

the treeview caching works fine as long as it is accessed fairly regularly.
but the site is not under heavy traffic and might go for an hour without any
hits. this means that the first person to access the site after a while gets
hit with a big delay.

was the post by this user accurate? is there any way to override it? it
takes ages to regenerate the xml files from datasets.

thanks
tim mackey.

----------------------------
Tim Mackey
www.ScootASP.NET - .NET web hosting ($10 / mo) and code centre
Click here to reveal e-mail address
----------------------------

Reply to this message...
 
    
Andy Smith (VIP)
Can we see the line of code you are using to insert the item into the =
cache?

Andy Smith
Staff Programmer
Harding ESE

    -----Original Message-----
        From:    Click here to reveal e-mail address=20
Sent:    Friday, October 19, 2001 8:21 AM
To:    "aspngescalate" <Click here to reveal e-mail address>
Subject:    [aspngescalate] cached items disappearing
=09
hi folks,
i posted a message on ngcache, about why my treeview user control was =
being
lost out of the cache.
there are no dependencies. it has its output caching set to 999999.=20
after 10 mins of no activity, it gets removed from the cache.

a member on ngcache reckoned this was because .net decided after a set =
time
of not being accessed, it wasn't important to cache it anymore. 'I' would
like to decide whether its important or not! that's what the 9999999 =
means!

the treeview caching works fine as long as it is accessed fairly regularly.=

but the site is not under heavy traffic and might go for an hour without =
any
hits. this means that the first person to access the site after a while =
gets
hit with a big delay.

was the post by this user accurate? is there any way to override it? it
takes ages to regenerate the xml files from datasets.=20

thanks
tim mackey.

----------------------------
Tim Mackey
www.ScootASP.NET - .NET web hosting ($10 / mo) and code centre
Click here to reveal e-mail address
----------------------------=20

| [aspngescalate] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngescalate.asp =3D JOIN/QUIT

Reply to this message...
 
    
Alex Lowe
Maybe you missed Rob Howard's (Microsoft) post to your question:

---------------
Yes, that is correct. Items can expire from the Cache due to 'underuse'.
For example, a DataSet (or User Control, Page, etc.) could be stored in
the Cache with a TimeDependency (Duration for OutputCaching) of 60
minutes. By default if the item is not used within a period of time (~10
minutes) it is automatically removed from the Cache. For items added to
the Cache API you can instruct the Cache not to remove the item by using
CacheItemPriorty.NotRemovable (advanced option include supporting a call
back), however, this is not an option for OutputCached pages or user
controls.

Rob
---------------

Notice that you can override the default behaviour using the
CacheItemPriority.NotRemovable.

Alex - AspFriends.com Moderation Team

ASP.NET Resource Site: http://aspalliance.com/aldotnet
Grand Rapids, MI ASP.NET User Group: http://www.asp-grandrapids.net

-----Original Message-----
From: Tim Mackey [mailto:Click here to reveal e-mail address]
Sent: Friday, October 19, 2001 10:21 AM
To: aspngescalate
Subject: [aspngescalate] cached items disappearing

hi folks,
i posted a message on ngcache, about why my treeview user control was
being lost out of the cache. there are no dependencies. it has its
output caching set to 999999.
after 10 mins of no activity, it gets removed from the cache.

a member on ngcache reckoned this was because .net decided after a set
time of not being accessed, it wasn't important to cache it anymore. 'I'
would like to decide whether its important or not! that's what the
9999999 means!

the treeview caching works fine as long as it is accessed fairly
regularly. but the site is not under heavy traffic and might go for an
hour without any hits. this means that the first person to access the
site after a while gets hit with a big delay.

was the post by this user accurate? is there any way to override it? it
takes ages to regenerate the xml files from datasets.

thanks
tim mackey.

----------------------------
Tim Mackey
www.ScootASP.NET - .NET web hosting ($10 / mo) and code centre
Click here to reveal e-mail address
----------------------------

| [aspngescalate] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngescalate.asp = JOIN/QUIT

Reply to this message...
 
 
System.Data.DataSet
System.Web.Caching.CacheItemPriority




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com