mastercache
Version:
Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers
18 lines (14 loc) • 320 B
text/typescript
import type { CacheEvent } from '../../types/main';
/**
* Event emitted when a cache store is cleared
* using `.clear()`
*/
export class CacheCleared implements CacheEvent {
name = 'cache:cleared' as const;
constructor(readonly store: string) {}
toJSON() {
return {
store: this.store,
};
}
}