We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 295d84f commit 5d885bbCopy full SHA for 5d885bb
DevCycle/Models/Cache.swift
@@ -75,13 +75,13 @@ class CacheService: CacheServiceProtocol {
75
let dictionary = try? JSONSerialization.jsonObject(
76
with: data, options: .fragmentsAllowed) as? [String: Any]
77
else {
78
- Log.debug("Skipping cached config: no config found")
+ Log.debug("Skipping cached config: no config found or invalid JSON detected")
79
+ cleanupCacheEntry(key: key)
80
return nil
81
}
82
83
do {
- let config = try UserConfig(from: dictionary)
84
- return config
+ return try UserConfig(from: dictionary)
85
} catch {
86
Log.warn("Skipping cached config: error parsing cached config. Deleting cached config")
87
cleanupCacheEntry(key: key)
0 commit comments