Skip to content

API Documentation / @pinia/colada / toCacheKey

Function: toCacheKey() ​

Serializes the given key (query or mutation key) to a string.

Param ​

key

The key to serialize.

See ​

EntryKey

Call Signature ​

ts
function toCacheKey(key): undefined;

Parameters ​

key ​

undefined

Returns ​

undefined

Call Signature ​

ts
function toCacheKey(key): string;

Parameters ​

key ​

EntryKey

Returns ​

string

Call Signature ​

ts
function toCacheKey(key): string | undefined;

Parameters ​

key ​

EntryKey | undefined

Returns ​

string | undefined

Released under the MIT License.