Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/velo/src/policy/tiny_lfu/frequency_sketch.ts

A high-performance caching library for Deno. Supports LRU, LFU, ARC, and TinyLFU.
Latest
import * as velo from "https://deno.land/x/velo@1.0.0/src/policy/tiny_lfu/frequency_sketch.ts";

Classes

A probabilistic set for estimating the frequency of elements within a time window to use as freshness metric for the TinyLFU [1] admission policy. Employing a Count-Min Sketch[2] where the counter matrix is represented by an array with length=width*depth. Width is at least the given capacity of the cache for accuracy, but is increased to the next power of two. The depth is 4 by default.