Reputation: 433
I am using NSURLSession to download a file from a specific url. I have come to the conclusion after several tests that the app itself caches the file, so when I try to download it again the app overrides my instructions and shows me the cached file. Is there a way to say to the program not to cache files? I have searched and haven't found anything... :(
Thank you in advance!
Upvotes: 0
Views: 477
Reputation: 56332
When you inititalize the NSURLRequest
you'll use with the Download Task, make sure to pass NSURLRequestCachePolicy.ReloadIgnoringLocalCacheData
as the value for the cachePolicy
argument.
Upvotes: 2