Groups | Blog | Home
all groups > asp.net > november 2004 >

asp.net : Cache objects on serverside and given intervals (timer?)



Dustin II.
11/22/2004 11:53:04 PM
Hi, I have a couple of rss feeds that are pulled into a datatable. I cache
the datatable and use the cache to avoid long load times. Is there a way to
do this caching in a timer on the server side so that I never have to worry
about taking the time to load the rss feed at page load time?

Karl Seguin
11/23/2004 8:19:07 AM
You could store it in the Application and create a timer. You can download
the community server forums (free) and see how they do it at:
http://www.telligentsystems.com/Solutions/Forums/

look at the Components/HttpModule/ForumsHttpModule.cs class


Basically, create your own HttpModule, create a private timer field, in the
init set up your timer to call a method every X minutes....in that method
suspend the timer, get the data, reactivate the timer, and finally in the
dispose method null the timers..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


[quoted text, click to view]

AddThis Social Bookmark Button