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

x/harmony/src/cache/default.ts>DefaultCacheAdapter

An easy to use Discord API Library for Deno.
Latest
class DefaultCacheAdapter
implements ICacheAdapter
import { DefaultCacheAdapter } from "https://deno.land/x/harmony@v2.9.1/src/cache/default.ts";

Default Cache Adapter for in-memory caching.

Properties

data: Map<string, Collection<string, unknown>>

Methods

array<T>(cacheName: string): T[] | undefined
delete(cacheName: string, ...keys: string[]): boolean
deleteCache(cacheName: string): boolean
get<T>(cacheName: string, key: string): T | undefined
keys(cacheName: string): string[] | undefined
set<T>(
cacheName: string,
key: string,
value: T,
expire?: number,
): void
size<T>(cacheName: string, filter?: (payload: T) => boolean): number | undefined