# EmojiRepositoryCache

class

Cache for emoji repository data.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-emoji/src/utils/emojirepositorycache.ts#L17)

<a id="properties">

## Properties

<a id="member-_cache">

### `_cache: Map<string, InspectablePromise<Array<EmojiEntry>>>` _(private)_

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

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-emoji/src/utils/emojirepositorycache.ts#L21)

<a id="methods">

## Methods

<a id="function-clear">

### `clear() → void`

Clears the cache.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-emoji/src/utils/emojirepositorycache.ts#L71)

#### Returns

* `void`

<a id="function-fetch">

### `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.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-emoji/src/utils/emojirepositorycache.ts#L34)

#### Parameters

* `params: FetchParams`

  Fetch parameters.

#### Returns

* `Promise<Array<EmojiEntry>>`

<a id="function-getSync">

### `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.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-emoji/src/utils/emojirepositorycache.ts#L58)

#### Parameters

* `__namedParameters: CacheKeyParams`

#### Returns

* `Array<EmojiEntry> | null`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
