CachePolicy

public enum CachePolicy

The cache policies allow you to define the source from where the SDK will retrieve the content.

  • The SDK retrieves data through a network call, and saves the retrieved data in the cache. This is set as the default policy.

    Declaration

    Swift

    case networkOnly
  • The SDK gets data from the cache.

    Declaration

    Swift

    case cacheOnly
  • The SDK gets data from the cache. However, if it fails to retrieve data from the cache, it makes a network call.

    Declaration

    Swift

    case cacheElseNetwork
  • The SDK gets data using a network call. However, if the call fails, it retrieves data from cache.

    Declaration

    Swift

    case networkElseCache
  • The SDK gets data from cache, and then makes a network call. (A success callback will be invoked twice.)

    Declaration

    Swift

    case cacheThenNetwork