FeatureFlagResultCache

public actor FeatureFlagResultCache

Feature Flag result cache

  • cache(flag:ttl:) Asynchronous

    Caches a flag for the given cachTTL.

    Declaration

    Swift

    public func cache(flag: FeatureFlag, ttl: TimeInterval) async

    Parameters

    flag

    The flag to cache

    ttl

    The time to cache the value for.

  • flag(name:) Asynchronous

    Gets a flag from the cache.

    Declaration

    Swift

    public func flag(name: String) async -> FeatureFlag?

    Parameters

    name

    The flag name.

    Return Value

    The flag if its in the cache, otherwise nil.

  • Removes a flag from the cache.

    Declaration

    Swift

    public func removeCachedFlag(name: String) async

    Parameters

    name

    The flag name.