ABSDKSQLLiteNormalizedCache
public final class ABSDKSQLLiteNormalizedCache : NormalizedCache
A SQLLite based normalized cache module for apollo store
-
Init a cache instance with a file URL
Declaration
Swift
public init(fileURL: URL) throws
Parameters
fileURL
The URL to the local sqlite db file
-
Merge a set of cached records
Declaration
Swift
public func merge(records: RecordSet) -> Promise<Set<CacheKey>>
Parameters
records
Records to merge
Return Value
A promise that returns a set of cache keys of merged records
-
Clear the cache
Declaration
Swift
public func clear() -> Promise<Void>
-
Load a set of cached records with the keys
Declaration
Swift
public func loadRecords(forKeys keys: [CacheKey]) -> Promise<[Record?]>
Parameters
keys
The keys of the caches to load
Return Value
A promise that returns a set of records loaded