2

In the timer_tick there is a webclient which checks a url and if that url returns something then the webclient downloads another url, basically the 2nd url is used like a GET, so when that 2nd url is called, the php server deletes the value from database. So the next time the 1st url is checked, nothing will be returned. But, the problem is, even after sending the 2nd url the webclient seems to return the old values for at least 3-4 times when the 1st url is checked on the consecutive timer cycles and then new data is shown. To confirm if the server itself is returning any cached data, I checked it manually by going to the link directly and no there were no cached data, it was always upto date right at the moment the execution of the 2nd url was performed. So, can anyone suggest why this might be happening?

Adib
  • 359
  • 1
  • 6
  • 16

1 Answers1

2

see C# WebClient disable cache


see https://msdn.microsoft.com/en-us/library/system.net.webclient.cachepolicy(v=vs.110).aspx


in short WebClient can cache. The first question details the difficulty in trying to prevent it caching

Community
  • 1
  • 1
tolanj
  • 3,651
  • 16
  • 30