UNPKG

@thermopylae/lib.cache

Version:
24 lines (23 loc) 784 B
import { BaseLFUEvictionPolicy, EvictableCacheEntry } from './lfu-base'; /** * [Least Frequently Used](https://en.wikipedia.org/wiki/Least_frequently_used "Least frequently used") eviction policy. * * @template Key Type of the key. * @template Value Type of the value. * @template ArgumentsBundle Type of the arguments bundle. */ declare class LFUEvictionPolicy<Key, Value, ArgumentsBundle> extends BaseLFUEvictionPolicy<Key, Value, ArgumentsBundle> { /** * @inheritDoc */ protected get initialFrequency(): number; /** * @inheritDoc */ protected computeEntryFrequency(_entry: EvictableCacheEntry<Key, Value>, entryScore: number): number; /** * @inheritDoc */ protected onEvict(): void; } export { LFUEvictionPolicy };