mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Save cacheControlInfo with the feed.
This commit is contained in:
@@ -89,6 +89,11 @@ extension LocalAccountRefresher: DownloadSessionDelegate {
|
||||
return
|
||||
}
|
||||
|
||||
if let error {
|
||||
os_log(.debug, "Error downloading \(url) - \(error)")
|
||||
return
|
||||
}
|
||||
|
||||
let conditionalGetInfo: HTTPConditionalGetInfo? = {
|
||||
if let httpResponse = response as? HTTPURLResponse {
|
||||
return HTTPConditionalGetInfo(urlResponse: httpResponse)
|
||||
@@ -96,9 +101,8 @@ extension LocalAccountRefresher: DownloadSessionDelegate {
|
||||
return nil
|
||||
}()
|
||||
|
||||
if let error {
|
||||
os_log(.debug, "Error downloading \(url) - \(error)")
|
||||
return
|
||||
if let httpURLResponse = response as? HTTPURLResponse, let cacheControlInfo = CacheControlInfo(urlResponse: httpURLResponse) {
|
||||
feed.cacheControlInfo = cacheControlInfo
|
||||
}
|
||||
|
||||
let dataHash = data.md5String
|
||||
|
||||
@@ -132,6 +132,15 @@ public final class WebFeed: Feed, Renamable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
public var cacheControlInfo: CacheControlInfo? {
|
||||
get {
|
||||
metadata.cacheControlInfo
|
||||
}
|
||||
set {
|
||||
metadata.cacheControlInfo = newValue
|
||||
}
|
||||
}
|
||||
|
||||
public var contentHash: String? {
|
||||
get {
|
||||
return metadata.contentHash
|
||||
|
||||
Reference in New Issue
Block a user