From 94a22da471c87e532bfb9f530892c2cf22f001c8 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Thu, 19 Sep 2019 11:27:38 -0700 Subject: [PATCH] Disables URL caching when fetching Source --- AltStore/Operations/FetchSourceOperation.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AltStore/Operations/FetchSourceOperation.swift b/AltStore/Operations/FetchSourceOperation.swift index e41710ab..a8b94874 100644 --- a/AltStore/Operations/FetchSourceOperation.swift +++ b/AltStore/Operations/FetchSourceOperation.swift @@ -14,7 +14,7 @@ class FetchSourceOperation: ResultOperation { let sourceURL: URL - private let session = URLSession(configuration: .default) + private let session: URLSession private lazy var dateFormatter: ISO8601DateFormatter = { let dateFormatter = ISO8601DateFormatter() @@ -24,6 +24,12 @@ class FetchSourceOperation: ResultOperation init(sourceURL: URL) { self.sourceURL = sourceURL + + let configuration = URLSessionConfiguration.default + configuration.requestCachePolicy = .reloadIgnoringLocalCacheData + configuration.urlCache = nil + + self.session = URLSession(configuration: configuration) } override func main()