import { TimerWheel } from "https://deno.land/x/velo@1.0.0/src/cache/capabilities/timer_wheel.ts";
Implementation of a timer wheel [1] to manage expiration of cache entries. Eviction events are stored in a hierarchical circular structure of buckets. Each bucket represents a rough time span (seconds, minutes, etc.). Based on Caffeine's implementation [2].
Type Parameters
K extends Key
Methods
private
applyBase(time: number)private
expire(index: number,
previousTicks: number,
delta: number,
private
findBucket(time: number)advance(currentTimeMs?: number)