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

x/velo/src/caches/base.ts>BaseCache#take

Performant Cache implementations for Deno. Supports LRU, LFU, ARC and other caching policies.
Go to Latest
method BaseCache.prototype.take
import { BaseCache } from "https://deno.land/x/velo@0.1.5/src/caches/base.ts";

Returns the value for a given key while removing this key from the cache. Equal to calling get and remove.

Parameters

key: Key

The entries key (will be removed from the cache)

Returns

V | undefined

The value of given key or undefined if the key is unknown