NamespaceAccessor
Interface: NamespaceAccessor<T>
Section titled “Interface: NamespaceAccessor<T>”Defined in: types/caching.ts:51
Namespace-scoped CRUD accessor for a single cached entity kind (channels, roles, users, guilds).
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”mset: (
entries) =>Promise<void>
Defined in: types/caching.ts:61
Cache multiple entities in one call.
Parameters
Section titled “Parameters”entries
Section titled “entries”object[]
Returns
Section titled “Returns”Promise<void>
Methods
Section titled “Methods”delete()
Section titled “delete()”delete(
id):Promise<void>
Defined in: types/caching.ts:57
Remove a cached entity by its ID.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<T | null>
has(
id):Promise<boolean>
Defined in: types/caching.ts:59
Check whether a non-expired entry exists for this ID.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”T
ttlMs?
Section titled “ttlMs?”number
Returns
Section titled “Returns”Promise<void>
