This commit is contained in:
Ali
2021-09-03 00:45:22 +04:00
parent 8aefa19d31
commit 1fe0d4a75b
53 changed files with 489 additions and 566 deletions

View File

@@ -8,14 +8,15 @@ public final class ItemCacheEntryId: Equatable, Hashable {
self.collectionId = collectionId
self.key = key
}
public func hash(into hasher: inout Hasher) {
hasher.combine(self.collectionId)
hasher.combine(self.key)
}
public static func ==(lhs: ItemCacheEntryId, rhs: ItemCacheEntryId) -> Bool {
return lhs.collectionId == rhs.collectionId && lhs.key == rhs.key
}
public var hashValue: Int {
return self.collectionId.hashValue &* 31 &+ self.key.hashValue
}
}
private enum ItemCacheSection: Int8 {