fix: fixed check if key exists in the Store after adding cache layer (#2749)

This commit is contained in:
Serhiy Mytrovtsiy
2025-10-10 17:57:40 +02:00
parent 446aa118d8
commit 9a70b48128

View File

@@ -46,7 +46,9 @@ public class Store {
}
public func exist(key: String) -> Bool {
return self.getValue(for: key, type: Any.self) != nil
return self.cacheQueue.sync {
self.cache.keys.contains(key) || self.defaults.object(forKey: key) != nil
}
}
public func remove(_ key: String) {