Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/velo/src/policy/arc.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/arc.ts";

Classes

Implementation of an Adaptive Replacement Cache (ARC) [1]. It adapitvely balances between recency and frequency. This is achieved by keeping track of evicted keys and their frequencies in ghost lists (b1 and b2). This increases the overall size of the cache, but allows for a better hit rate.