Interface FlagsmithCache

Stores and retrieves Flags from a cache.

interface FlagsmithCache {
    get(key): Promise<Flags>;
    set(key, value): Promise<void>;
}

Methods

Methods

  • Retrieve the cached Flags for the given environment or identity, or undefined if no cached value exists.

    Parameters

    • key: string

      An environment ID or identity identifier, which is used as the cache key.

    Returns Promise<Flags>

  • Persist an environment or identity's Flags in the cache.

    Parameters

    • key: string

      An environment ID or identity identifier, which is used as the cache key.

    • value: Flags

      The Flags to be stored in the cache.

    Returns Promise<void>