有没有办法清除 NSURLConnection 缓存?
我用它来下载一些字符串,但即使我从我的服务器更改了它,我仍然得到相同的字符串。
最佳答案
您可以使用以下方式显式清除缓存:
objective-c
[[NSURLCache sharedURLCache] removeAllCachedResponses];
迅速
URLCache.shared.removeAllCachedResponses()
关于ios - 清除 NSURLConnection 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7908815/