Web Service Start Up

E

Erick

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
 
G

Guest

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
 
J

John Saunders [MVP]

Erick said:
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.

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top