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