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 = 0Swift
case ignoreCache = 0 -
Only query from the local cache.
Declaration
Objective-C
kLCCachePolicyCacheOnlySwift
case cacheOnly = 1 -
Only query from server, and save result to the local cache.
Declaration
Objective-C
kLCCachePolicyNetworkOnlySwift
case networkOnly = 2 -
Firstly query from the local cache, if fails, query from server.
Declaration
Objective-C
kLCCachePolicyCacheElseNetworkSwift
case cacheElseNetwork = 3 -
Firstly query from server, if fails, query the local cache.
Declaration
Objective-C
kLCCachePolicyNetworkElseCacheSwift
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
kLCCachePolicyCacheThenNetworkSwift
case cacheThenNetwork = 5
View on GitHub
Install in Dash
LCCachePolicy Enumeration Reference