export interface Options { /** Maximum number of items the cache can hold */ itemLimit: number; } /** * Create a cache manually. Only useful when you want to specify different options. */ export declare function create(cacheName: string, options?: Partial): void; /** * Use a cache for some arbitrary operation. * This is primarily intended for de-duplicating API requests * @param cacheName The name of the cache to use, e.g. `'users'` * @param key The key for the item in the cache. This can be anything used for the key of a `Map` * @param miss The function to run on a cache miss * @remarks * Note that a cache will automatically be created if it doesn't already exist */ export declare function use(cacheName: string, key: Key, miss: () => Result): Result; export declare function invalidate(cacheName: string, key: any): void; export declare function update(cacheName: string, key: any, value: any): void;