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

x/levo/src/memory-cache.ts>MemoryCache

Server side rendering with The Elm Architecture in Deno
Latest
class MemoryCache
import { MemoryCache } from "https://deno.land/x/levo@v0.0.27/src/memory-cache.ts";

Constructors

new
MemoryCache(unnamed 0: { maxNumberOfKeys: number; })

Properties

private
cache: Record<string, T | undefined>
private
maxNumberOfKeys: number
private
retrievalFrequency: Record<string, number>

Methods

_getCache(): Record<string, T | undefined>

For testing purposes only

_getRetrievalFrequency(): Record<string, number>
get(key: string): T | undefined
set(key: string, value: T): void