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:
Brent Simmons
2017-09-11 13:15:12 -07:00
parent 258abab9f6
commit 45063d2d96
3 changed files with 20 additions and 135 deletions

View File

@@ -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
}
}