Class

CacheController

Public cache facade: limits, stats, sweeps, and cascade teardown entry points. Not a second source of truth — wraps managers / MessageCache.

Constructor

new CacheController(client: Client, limits: ResolvedCacheLimits)
client
Client

Properties

NameTypeDescription
cascadingread-onlybooleanWhether a cascade teardown is currently in progress.
limitsread-onlyResolvedCacheLimitsResolved limits applied at Client construction.

Methods

.sweepChannels(filter?)

filter?: (channel: Channel, id: string) => booleannumber

Sweep channels from the global index (cascades guild index + message cache). Returns count removed.

client.cache.sweepChannels();

.sweepGuilds(filter?)

filter?: (guild: Guild, id: string) => booleannumber

Sweep guilds (cascades channels + message caches). Returns count removed.

client.cache.sweepGuilds();