Sign up (with export icon)

EmojiRepositoryCache

Api-class iconclass

Cache for emoji repository data.

Properties

  • Chevron-right icon

    _cache : Map<string, InspectablePromise<Array<EmojiEntry>>>
    Lock iconprivate

    Fetch-and-transform promises, keyed by composite key.

Methods

  • Chevron-right icon

    clear() → void

    Clears the cache.

    Returns

    void
  • Chevron-right icon

    fetch( params ) → Promise<Array<EmojiEntry>>

    Fetches emoji data for url, runs it through transform, and caches the result. At most one HTTP request is issued per unique [url, ...cacheKeys] combination. Returns [] on network or HTTP failure.

    Parameters

    params : FetchParams

    Fetch parameters.

    Returns

    Promise<Array<EmojiEntry>>
  • Chevron-right icon

    getSync( __namedParameters ) → Array<EmojiEntry> | null

    Synchronously returns the already-transformed array for the given url + cacheKeys, or null if the result is not yet available.

    Parameters

    __namedParameters : CacheKeyParams

    Returns

    Array<EmojiEntry> | null