mastercache
Version:
Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers
1 lines • 882 B
Source Map (JSON)
{"version":3,"sources":["../../../../src/events/cache/cache-hit.ts"],"sourcesContent":["import type { CacheEvent } from '../../types/main';\n\n/**\n * Event emitted when a cache entry is hit\n */\nexport class CacheHit implements CacheEvent {\n name = 'cache:hit' as const;\n\n constructor(\n readonly key: string,\n readonly value: any,\n readonly store: string,\n readonly graced: boolean = false,\n ) {}\n\n toJSON() {\n return {\n key: this.key,\n value: this.value,\n store: this.store,\n graced: this.graced,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,WAAN,MAAqC;AAAA,EAG1C,YACW,KACA,OACA,OACA,SAAkB,OAC3B;AAJS;AACA;AACA;AACA;AAAA,EACR;AAAA,EAPH,OAAO;AAAA,EASP,SAAS;AACP,WAAO;AAAA,MACL,KAAK,KAAK;AAAA,MACV,OAAO,KAAK;AAAA,MACZ,OAAO,KAAK;AAAA,MACZ,QAAQ,KAAK;AAAA,IACf;AAAA,EACF;AACF;","names":[]}