/** * @template K, V */ export class Cache { /** * @param {number} timeout */ constructor(timeout: number); timeout: number; /** * @type list.List> */ _q: list.List>; /** * @type {Map>} */ _map: Map>; } export function removeStale(cache: Cache): number; export function set(cache: Cache, key: K, value: V): void; export function get(cache: Cache, key: K): V | undefined; export function refreshTimeout(cache: Cache, key: K): void; export function getAsync(cache: Cache, key: K): V | Promise | undefined; export function remove(cache: Cache, key: K): V | undefined; export function setIfUndefined(cache: Cache, key: K, init: () => Promise, removeNull?: boolean): V | Promise; export function create(timeout: number): Cache; import * as list from "./list.js"; /** * @template K, V * * @implements {list.ListNode} */ declare class Entry implements list.ListNode { /** * @param {K} key * @param {V | Promise} val */ constructor(key: K, val: V | Promise); /** * @type {this | null} */ prev: Entry | null; /** * @type {this | null} */ next: Entry | null; created: number; val: V | Promise; key: K; } export {}; //# sourceMappingURL=cache.d.ts.map