I have an issue which is driving me crazy. I searched for hours for an answer without any luck. I am developing a WINRT/Windows Phone 8.1 App where I call a RESTful webservice from the following code:
HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync(new Uri("my_secret_uri"));
string data = await response.Content.ReadAsStringAsync();
MessageDialog dialog = new MessageDialog(data);
await dialog.ShowAsync();
This works fine and it returns the correct data. I then do the following:
- Navigate away from the page displaying the data
- Manually change some of the data in the Webservice database
- Navigate back to the page
I would now expect it to pull the new data which I changed in step #2 but it still returns the initial data. If I enter 'my_secret_uri' in a webbrowser it correctly displays the modified data. If I stop the App and launch it again it also correctly shows the modified data.
It is as if the data that was initially pulled is cached as long as the App is running.
Any idea what is wrong?