I'm trying to speed up my web services.
My problem is that the data takes a while to build so I cache it and
only refresh the data every 24 hours.
However, the data will only cache after the first person requests it.
This causes a 3 minute delay before the user gets a response and the
session times out. Once in Cache the response is almost
instantanious.
is there a way that i can load my cache so that the data is already
sitting in cache before the first user makes any web method requests?
Global.asax on start only runs when the first user makes a request. I
need to it run before that.
Regards
Josef
Spam Catcher - 29 Feb 2008 05:15 GMT
Erick <josefszeliga@hotmail.com> wrote in news:497333f6-75d6-4428-8548-
d7e3032119c2@s13g2000prd.googlegroups.com:
> is there a way that i can load my cache so that the data is already
> sitting in cache before the first user makes any web method requests?
>
> Global.asax on start only runs when the first user makes a request. I
> need to it run before that.
If you need to statefully store information, have you considered caching it
in a local database?
Otherwise, you could create a stateful process (i.e. service) and fetch it
locally from there.
Lastly, there are ways to keep ASP.NET from recycling the appdomain, but it
seems a bit hackish to do:
http://weblogs.asp.net/pwilson/archive/2003/12/02/40681.aspx

Signature
spamhoneypot@rogers.com (Do not e-mail)
John Saunders [MVP] - 01 Mar 2008 18:53 GMT
> I'm trying to speed up my web services.
> My problem is that the data takes a while to build so I cache it and
[quoted text clipped - 9 lines]
> Global.asax on start only runs when the first user makes a request. I
> need to it run before that.
You could write a small console application that would issue the same web
service request as the users do. Run it periodically, or when the system
starts. In effect, you would be creating the first user. This user would
still see the three minute delay; he just wouldn't complain about it!

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer