You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
494 B
16 lines
494 B
import type { CommonCache } from "./common"; |
|
export declare class StrongCache<K = any, V = any> implements CommonCache<K, V> { |
|
private max; |
|
dispose: (value: V, key: K) => void; |
|
private map; |
|
private newest; |
|
private oldest; |
|
constructor(max?: number, dispose?: (value: V, key: K) => void); |
|
has(key: K): boolean; |
|
get(key: K): V | undefined; |
|
get size(): number; |
|
private getNode; |
|
set(key: K, value: V): V; |
|
clean(): void; |
|
delete(key: K): boolean; |
|
}
|
|
|