/** * Copyright (c) 2019-23 mol* contributors, licensed under MIT, See LICENSE file for more info. * * Adapted from LiteMol. * @author David Sehnal */ import { LinkedList } from '../mol-data/generic.js'; export { LRUCache }; interface LRUCache { entries: LinkedList>; capacity: number; } declare namespace LRUCache { interface Entry { key: string; data: T; } function create(capacity: number): LRUCache; function get(cache: LRUCache, key: string): T | undefined; function set(cache: LRUCache, key: string, data: T): T | undefined; function remove(cache: LRUCache, key: string): void; }