web / lib/services/cache/manager
lib/services/cache/manager
Cache manager for tracking and managing cache instances.
Provides global operations (cleanup, stats, destroy) across all registered cache instances. Individual caches register themselves via their own constructors; the manager does not create caches.
Classes
CacheManager
Cache manager for tracking and managing cache instances.
Constructors
Constructor
new CacheManager():
CacheManager
Returns
Methods
clearAll()
staticclearAll():Promise<void>
Clear all cache instances
Returns
Promise<void>
getAllStats()
staticgetAllStats():Promise<Record<string,CacheStats>>
Get stats for all caches
Returns
Promise<Record<string, CacheStats>>
cleanupAll()
staticcleanupAll():Promise<number>
Cleanup all cache instances
Returns
Promise<number>
destroyAll()
staticdestroyAll():void
Destroy all cache instances
Returns
void
getInstance()
staticgetInstance(name):Cache|undefined
Get a specific cache instance if it exists
Parameters
name
string
Returns
Cache | undefined
hasInstance()
statichasInstance(name):boolean
Check if a cache instance exists
Parameters
name
string
Returns
boolean