Cache objects on serverside and given intervals (timer?)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?

Thanks
 
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
 
Back
Top