From 9a70b48128db1e2f4bad795f1fb93196d84e7b97 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Fri, 10 Oct 2025 17:57:40 +0200 Subject: [PATCH] fix: fixed check if key exists in the Store after adding cache layer (#2749) --- Kit/plugins/Store.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kit/plugins/Store.swift b/Kit/plugins/Store.swift index a5092236..eb261e88 100644 --- a/Kit/plugins/Store.swift +++ b/Kit/plugins/Store.swift @@ -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) {