diff --git a/Sources/Bodega/Documentation.docc/Articles/Fundamentals/Using StorageEngines.md b/Sources/Bodega/Documentation.docc/Articles/Fundamentals/Using StorageEngines.md index 01bc0dd..a4792e7 100644 --- a/Sources/Bodega/Documentation.docc/Articles/Fundamentals/Using StorageEngines.md +++ b/Sources/Bodega/Documentation.docc/Articles/Fundamentals/Using StorageEngines.md @@ -28,6 +28,7 @@ public protocol StorageEngine: Actor { func removeAllData() async throws func keyExists(_ key: CacheKey) async -> Bool + func keysExist(_ keys: [CacheKey]) async -> [CacheKey] func keyCount() async -> Int func allKeys() async -> [CacheKey] diff --git a/Sources/Bodega/StorageEngine.swift b/Sources/Bodega/StorageEngine.swift index 6dfa391..42f2b94 100644 --- a/Sources/Bodega/StorageEngine.swift +++ b/Sources/Bodega/StorageEngine.swift @@ -94,7 +94,7 @@ extension StorageEngine { public func keysExist(_ keys: [CacheKey]) async -> [CacheKey] { let allKeys = await self.allKeys() let keySet = Set(allKeys) - return keys.filter { keySet.contains($0) } + return keys.filter({ keySet.contains($0) }) } /// Read the number of keys located in the ``StorageEngine``.