Skip to content

NamespaceAccessor

Defined in: types/caching.ts:51

Namespace-scoped CRUD accessor for a single cached entity kind (channels, roles, users, guilds).

T

mset: (entries) => Promise<void>

Defined in: types/caching.ts:61

Cache multiple entities in one call.

object[]

Promise<void>

delete(id): Promise<void>

Defined in: types/caching.ts:57

Remove a cached entity by its ID.

string

Promise<void>


get(id): Promise<T | null>

Defined in: types/caching.ts:53

Retrieve a cached entity by its ID. Returns null if not found or expired.

string

Promise<T | null>


has(id): Promise<boolean>

Defined in: types/caching.ts:59

Check whether a non-expired entry exists for this ID.

string

Promise<boolean>


set(data, ttlMs?): Promise<void>

Defined in: types/caching.ts:55

Cache an entity. Falls back to the CacheManager’s default TTL if not specified.

T

number

Promise<void>