Is there a way to clear NSURLConnection cache?
I used that to download some strings but I keep getting the same strings even though I changed that from my server.
Is there a way to clear NSURLConnection cache?
I used that to download some strings but I keep getting the same strings even though I changed that from my server.
You specify cache policy when you create your NSURLRequest object. Set the cachePolicy
property to NSURLRequestReloadIgnoringCacheData
or use the initWithURL:cachePolicy:timeoutInterval: initializer. See documentation on cache policy.
Here's a way from official Apple pages that might help. Just read the short and informative answer in the link.
I had same issue, no matter what I do I will keep getting old data from web. I did a simple solution. I made a php script. This script reads the data . now I access this php script instead of the data file and I am good to go.