Skip to main content
Module

x/velo/mod.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/mod.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.

Least Frequently Used (LFU)

Least Recently Used (LRU)

Second Chance (SC)

Builder class for Cache and LoadingCache. Allows to add optional functionality to a cache. The following options are available:

Window-TinyLFU (W-TinyLFU) implementation as per https://dl.acm.org/citation.cfm?id=3149371 inspired by Caffeine's implementation: https://github.com/ben-manes/caffeine.

Enums

The reason why a cache entry was removed.