W
Weston Weems
I attempted to post this yesterday however I dont see that
it ever made it up. If this is an error on my part, I
apologize in advance.
I've got a webapp with somewhat trivial amount of data,
however aquiring the data from the database usually takes
approximately 1.5minutes. So first thing that pops into my
head is cache it.
What I'd like to do is load the cache up on
Application_Start, then refresh every 4hrs or so. I'd like
to avoid handling it lazily, because that guarentees one
person will need to wait 1.5 minutes, whereas if it was
just refreshed every 4hrs on the backend, that condition
may occur, and it may not.
I've got no problem loading up data on application_start,
and set a CacheItemRemovedCallBack to execute a method to
reload the cache with the data. The problem I am
encountering is that I cant get a HttpContext to pull the
cache object from.
Should I be doing this a better way, or anyone have any
sort of advice whatsoever? Source samples?
Thanks in advance,
Weston Weems
it ever made it up. If this is an error on my part, I
apologize in advance.
I've got a webapp with somewhat trivial amount of data,
however aquiring the data from the database usually takes
approximately 1.5minutes. So first thing that pops into my
head is cache it.
What I'd like to do is load the cache up on
Application_Start, then refresh every 4hrs or so. I'd like
to avoid handling it lazily, because that guarentees one
person will need to wait 1.5 minutes, whereas if it was
just refreshed every 4hrs on the backend, that condition
may occur, and it may not.
I've got no problem loading up data on application_start,
and set a CacheItemRemovedCallBack to execute a method to
reload the cache with the data. The problem I am
encountering is that I cant get a HttpContext to pull the
cache object from.
Should I be doing this a better way, or anyone have any
sort of advice whatsoever? Source samples?
Thanks in advance,
Weston Weems