Skip to main content
Microsoft Silverlight
Home Forums Silverlight Programming Programming with .NET - General REST Service cache problem
3 replies. Latest Post by gabouy on November 25, 2008.
(0)
eric_del...
Member
181 points
43 Posts
11-12-2008 8:21 AM |
Hello, I have a problem with astoria rest services (ADO.Net Data Services) and the cache
I am consuming a rest service basically a "select * from table" from my silverlight application.My problem is that the result is always the same but i update the table. Investigating with http monitor i realized tha the result is always from cache, that is the cause.How can i clear the cache and always have a updated data?
In develop enviroment this problem didn't exist but now in production yes... i'm nervous... any suggestion is welcome
Thanks.
gabouy
219 points
45 Posts
11-12-2008 8:32 AM |
It doesn't seem to be a silverlight issue, If I were you I'd also post this question in a Data Services forum :)
11-14-2008 1:05 PM |
Ugly response
Ok.
Lesson 1The most important options for working with data in Silverlight
1. SOAP2. REST
Then, this can be a problem of interest for this forum.
OutgoingWebResponseContext outResponse = WebOperationContext.Current.OutgoingResponse; outResponse.Headers.Add("cache-control", "no-store, no-cache, must-revalidate"); outResponse.Headers.Add("Pragma", "no-cache"); outResponse.Headers.Add("ROBOTS", "NOARCHIVE");
I hope that my experience will serve other to resolve this problem with which you can meet when develop Silverlight applications.
EriC#
11-25-2008 1:24 PM |
sorry, didnt mean to be "ugly", only to point out another source for help since you were becoming "nervous" (do notice the "also")