mastercache
Version:
Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers
1 lines • 821 B
Source Map (JSON)
{"version":3,"sources":["../../../../src/events/cache/cache-written.ts"],"sourcesContent":["import type { CacheEvent } from '../../types/main';\n\n/**\n * Event emitted when a cache entry is written\n * using `set`,`getOrSet`\n */\nexport class CacheWritten implements CacheEvent {\n name = 'cache:written' as const;\n\n constructor(\n readonly key: string,\n readonly value: any,\n readonly store: string,\n ) {}\n\n toJSON() {\n return {\n key: this.key,\n store: this.store,\n value: this.value,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,eAAN,MAAyC;AAAA,EAG9C,YACW,KACA,OACA,OACT;AAHS;AACA;AACA;AAAA,EACR;AAAA,EANH,OAAO;AAAA,EAQP,SAAS;AACP,WAAO;AAAA,MACL,KAAK,KAAK;AAAA,MACV,OAAO,KAAK;AAAA,MACZ,OAAO,KAAK;AAAA,IACd;AAAA,EACF;AACF;","names":[]}