Skip to content

Commit 26e9abb

Browse files
committed
fix: add sdk version to cache keys for configs
1 parent f34f6dd commit 26e9abb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

DevCycle/Models/Cache.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ protocol CacheServiceProtocol {
1818

1919
class CacheService: CacheServiceProtocol {
2020
struct CacheKeys {
21+
static let platform = PlatformDetails()
22+
static let versionPrefix = "VERSION_\(platform.sdkVersion)"
23+
2124
static let anonUserId = "ANONYMOUS_USER_ID"
22-
static let identifiedConfigKey = "IDENTIFIED_CONFIG"
23-
static let anonymousConfigKey = "ANONYMOUS_CONFIG"
25+
static let identifiedConfigKey = "\(versionPrefix).IDENTIFIED_CONFIG"
26+
static let anonymousConfigKey = "\(versionPrefix).ANONYMOUS_CONFIG"
2427
static let userIdSuffix = ".USER_ID"
2528
static let expiryDateSuffix = ".EXPIRY_DATE"
2629

0 commit comments

Comments
 (0)