Prevent cache for URLSession


Swift


let config = URLSessionConfiguration.default
config.requestCachePolicy = .reloadIgnoringLocalCacheData
config.urlCache = nil

let session = URLSession.init(configuration: config)

Written by fbrefere001

Posted by fbrefere001 on Thursday February 8, 2018