web service

randy_belcher
01-29-2004, 09:58 AM
Hello everyone, I have a question that may have no answer, but maybe someone can tell me how to accomplish this. Here's the problem. I want to create a web service that pulls data from a database every 4 or 5 minutes. I want to create a function that will return this information anytime it is requested. This way I reduce the number of hits on the database. Is there anyway to do this? or does the web service have to wait for a request before it can do anything? Thanks for the help.

randy_belcher
01-29-2004, 01:23 PM
it looks like caching my data may work.

Optikal
01-29-2004, 04:38 PM
You can use the classes of the System.Web.Caching. You are correct the web service (should) only do processing when it receives a request, so the way you handle it is you put a timestamp on the cached data, then when you retrieve you check the timestamp to see if it has 'expired' and needs to be refreshed from the database. If you use System.Web.Caching all this is handled for you.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum