LCCachePolicy
Objective-C
enum LCCachePolicy : NSInteger {}
Swift
enum LCCachePolicy : Int, @unchecked Sendable
Cache policies
-
Query from server and do not save result to the local cache.
Declaration
Objective-C
kLCCachePolicyIgnoreCache = 0
Swift
case ignoreCache = 0
-
Only query from the local cache.
Declaration
Objective-C
kLCCachePolicyCacheOnly
Swift
case cacheOnly = 1
-
Only query from server, and save result to the local cache.
Declaration
Objective-C
kLCCachePolicyNetworkOnly
Swift
case networkOnly = 2
-
Firstly query from the local cache, if fails, query from server.
Declaration
Objective-C
kLCCachePolicyCacheElseNetwork
Swift
case cacheElseNetwork = 3
-
Firstly query from server, if fails, query the local cache.
Declaration
Objective-C
kLCCachePolicyNetworkElseCache
Swift
case networkElseCache = 4
-
Firstly query from the local cache, return result. Then query from server, return result. The callback will be called twice.
Declaration
Objective-C
kLCCachePolicyCacheThenNetwork
Swift
case cacheThenNetwork = 5