browser-cache-async
Version:
The browser-cache-async package provides a highly customizable, asynchronous caching system for client-side data management. Leveraging the power of the browser's IndexedDB, it enables efficient storage and retrieval of API responses, significantly reduci
12 lines (11 loc) • 356 B
TypeScript
import { IRecordID } from 'browser-keyval-stores';
import { IQueryOptions } from './shared/types.js';
/**
* Browser Cache
* Object in charge of managing the caching of data in the browser.
*/
interface IBrowserCache<T> {
run: (options: IQueryOptions<T>) => Promise<T>;
revalidate(id?: IRecordID): Promise<void>;
}
export type { IBrowserCache };