UNPKG

@melchyore/adonis-cache

Version:
16 lines (15 loc) 407 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class CacheEvent { constructor(config, emitter) { this.config = config; this.emitter = emitter; } emit(data) { const event = data.EVENT; if (this.config.events[event]) { this.emitter.emit(event, data.toJSON()); } } } exports.default = CacheEvent;