File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Sources/CacheStore/Stores Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -211,13 +211,9 @@ public extension CacheStore {
211211
212212extension CacheStore {
213213 func isCacheEqual( to updatedStore: CacheStore < Key > ) -> Bool {
214- #if DEBUG
215- let cacheStoreCount = cache. count
216- #else
217- lock. lock ( )
218- let cacheStoreCount = cache. count
219- lock. unlock ( )
220- #endif
214+ lock. lock ( )
215+ let cacheStoreCount = cache. count
216+ lock. unlock ( )
221217
222218 guard cacheStoreCount == updatedStore. cache. count else { return false }
223219
@@ -233,11 +229,6 @@ extension CacheStore {
233229 }
234230
235231 func isValueEqual< Value> ( toUpdatedValue updatedValue: Value , forKey key: Key ) -> Bool {
236- #if !DEBUG
237- lock. lock ( )
238- defer { lock. unlock ( ) }
239- #endif
240-
241232 guard let storeValue: Value = get ( key) else {
242233 return false
243234 }
You can’t perform that action at this time.
0 commit comments