randy_belcher
Freshman
- Joined
- Dec 10, 2003
- Messages
- 37
ok, there is a little more to this problem than the initial question. I have a web service that runs an intensive data query. It takes anywhere from 10 to 20 seconds to retrieve the results. A timer variable is held in the cache to make sure the query is only ran once every 30 seconds, no matter how many requests are made to the service. To keep everyone from waiting on the data. The data is also cached in memory. The wait problem occurs when a request comes in after the 30 seconds and the data needs required. My solution was to get the data on a separate thread. Another words, when the data needs required, start a thread to save the data in the cache, but go ahead and return the data that is currently in the cache to the requestee, so he doesn't see a big pause on his screen. The problem is, I never get any data, so I believe the thread is not completing or the data is not being saved in the cache correctly? Will the thread not complete if the service ends because the currently cached data is returned so quickly? Any help is appreciated. Thanks.
Randy
old question: Hello everybody! How can I access the Context.Cache in a class in my web service? Thanks.
Randy
Randy
old question: Hello everybody! How can I access the Context.Cache in a class in my web service? Thanks.
Randy
Last edited: