IdentifyCacheUsage

public enum IdentifyCacheUsage

When a new LDContext is being identified, the SDK has a few choices it can make on how to handle intermediate flag evaluations until fresh values have been retrieved from the LaunchDarkly APIs.

  • no

    no will not load any flag values from the cache. Instead it will maintain the current in memory state from the previously identified context.

    This method ensures the greatest continuity of experience until the identify network communication resolves.

    Declaration

    Swift

    case no
  • yes

    yes will clear the in memory state of any previously known flag values. The SDK will attempt to load cached flag values for the newly identified context. If no cache is found, the state remains empty until the network request resolves.

    Declaration

    Swift

    case yes
  • ifAvailable will attempt to load cached flag values for the newly identified context. If cached values are found, the in memory state is fully replaced with those values.

    If no cached values are found, the existing in memory state is retained until the network request resolves.

    Declaration

    Swift

    case ifAvailable