mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed check if key exists in the Store after adding cache layer (#2749)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user