@@ -44,7 +44,7 @@ final class RemoteSettings: SettingsProvider, Sendable {
4444
4545 private var sessionsCache : [ String : Any ] {
4646 cache. withLock { cache in
47- return cache. cacheContent [ RemoteSettings . flagSessionsCache] as? [ String : Any ] ?? [ : ]
47+ cache. cacheContent [ RemoteSettings . flagSessionsCache] as? [ String : Any ] ?? [ : ]
4848 }
4949 }
5050
@@ -65,23 +65,22 @@ final class RemoteSettings: SettingsProvider, Sendable {
6565 }
6666 }
6767
68- downloader. fetch { result in
69-
70- switch result {
71- case let . success( dictionary) :
72- self . cache. withLock { cache in
73- // Saves all newly fetched Settings to cache
74- cache. cacheContent = dictionary
75- // Saves a "cache-key" which carries TTL metadata about current cache
76- cache. cacheKey = CacheKey (
77- createdAt: currentTime,
78- googleAppID: self . appInfo. appID,
79- appVersion: self . appInfo. synthesizedVersion
80- )
81- }
68+ downloader. fetch { result in
69+
70+ switch result {
71+ case let . success( dictionary) :
72+ self . cache. withLock { cache in
73+ // Saves all newly fetched Settings to cache
74+ cache. cacheContent = dictionary
75+ // Saves a "cache-key" which carries TTL metadata about current cache
76+ cache. cacheKey = CacheKey (
77+ createdAt: currentTime,
78+ googleAppID: self . appInfo. appID,
79+ appVersion: self . appInfo. synthesizedVersion
80+ )
81+ }
8282 case let . failure( error) :
8383 Logger . logError ( " [Settings] Fetching newest settings failed with error: \( error) " )
84-
8584 }
8685 }
8786 }
@@ -114,7 +113,7 @@ extension RemoteSettingsConfigurations {
114113
115114 func isSettingsStale( ) -> Bool {
116115 cache. withLock { cache in
117- return isCacheExpired ( cache, time: Date ( ) )
116+ isCacheExpired ( cache, time: Date ( ) )
118117 }
119118 }
120119
0 commit comments