ReadPolicy
public enum ReadPolicy
Policy that describes how a read operation should perform.
-
Doesn’t hit the network, forcing the data to be read only from the local cache.
Declaration
Swift
case forceLocal
-
Doesn’t hit the local cache, forcing the data to be read only from the network (backend).
Declaration
Swift
case forceNetwork
-
Read first from the local cache and then try to get data from the network (backend).
Declaration
Swift
case both
-
Tries to get the most recent data from the backend first, if it fails and the response is NOT a 4xx/5xx status code, it returns data from the local cache.
Declaration
Swift
case networkOtherwiseLocal