crnc
Version:
currency conversion and functionality for the web
14 lines (13 loc) • 426 B
TypeScript
import { BasicStorage } from "../interfaces.js";
export declare function cache<xPayload>({ lifespan, storage, storageKey, load, }: {
lifespan: number;
storage: BasicStorage;
storageKey: string;
load: () => Promise<xPayload>;
}): {
read(): Promise<xPayload>;
readFresh(): Promise<xPayload>;
readCache(): Promise<xPayload>;
write(payload: xPayload): Promise<void>;
clear(): Promise<void>;
};