mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Remove cache from DatabaseLookupTable because it made the code too complex. If profiling says we need caching, we can add it back later.
This commit is contained in:
@@ -57,3 +57,22 @@ struct RelatedObjectIDsMap {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct LookupValue: Hashable {
|
||||
|
||||
let objectID: String
|
||||
let relatedObjectID: String
|
||||
let hashValue: Int
|
||||
|
||||
init(objectID: String, relatedObjectID: String) {
|
||||
|
||||
self.objectID = objectID
|
||||
self.relatedObjectID = relatedObjectID
|
||||
self.hashValue = (objectID + relatedObjectID).hashValue
|
||||
}
|
||||
|
||||
static func ==(lhs: LookupValue, rhs: LookupValue) -> Bool {
|
||||
|
||||
return lhs.objectID == rhs.objectID && lhs.relatedObjectID == rhs.relatedObjectID
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user