You have a few options.
Disabling the URLCache Completely
let manager: Manager = {
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
configuration.URLCache = nil
return Manager(configuration: configuration)
}()
Configuring the Request Cache Policy
let manager: Manager = {
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
configuration.requestCachePolicy = .ReloadIgnoringLocalCacheData
return Manager(configuration: configuration)
}()
Both approaches should do the trick for you. For more information, I'd suggest reading through the documentation for NSURLSessionConfiguration and NSURLCache. Another great reference is NSHipster article on NSURLCache.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…