mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Save cacheControlInfo with the feed.
This commit is contained in:
1 parent
b881d2fed6
commit
295d4576e0
2 files changed
+16
-3
No files matched your search
@@ -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