Skip to content

Commit

Permalink
Update implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoncal committed Dec 5, 2024
1 parent 7ff34c6 commit cef11e0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Source/Caches/HACachesContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,10 @@ public class HACachesContainer {
return true
}

do {
let currentData = try JSONSerialization.data(withJSONObject: entry.data, options: .prettyPrinted)
let requestedData = try JSONSerialization.data(withJSONObject: data, options: .prettyPrinted)
let currentData = try? JSONSerialization.data(withJSONObject: entry.data, options: .prettyPrinted)
let requestedData = try? JSONSerialization.data(withJSONObject: data, options: .prettyPrinted)

return currentData == requestedData
} catch {
HAGlobal.log(.error, "HACache error on JSON serialization: \(error.localizedDescription) ")
return false
}
return currentData == requestedData
}), let cache = cacheEntry.cache as? HACache<KeyType.Value> {
return cache
}
Expand Down

0 comments on commit cef11e0

Please sign in to comment.