Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cache_mapset/fifo.ts>FIFOSet

Maps and Sets with cache replacement policies, TC39 proposal-policy-map-set implementation
Latest
class FIFOSet
extends BaseSet<T>
import { FIFOSet } from "https://deno.land/x/cache_mapset@1.0.0/fifo.ts";

Set with an upper limit, objects like. When the upper limit is reached, replaces the value with FIFO algorithm.

Examples

Example 1

import { FIFOSet } from "https://deno.land/x/cache_mapset@$VERSION/fifo.ts";

declare const maxNumOfValues: number;
const set = new FIFOSet(maxNumOfValues);

Constructors

new
FIFOSet(maxNumOfValues: number, values?: Readonly<Iterable<T>>)

Properties

protected
cache: FIFOMap<T, void>