@linkedmink/multilevel-aging-cache
Version:
Package provides an interface to cache and persist data to Redis, MongoDB, memory
17 lines (16 loc) • 629 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OverwriteAlwaysSetStrategy = void 0;
const AgingCacheWriteStrategy_1 = require("./AgingCacheWriteStrategy");
/**
* Strategy to overwrite regardless of the higher level value
*/
class OverwriteAlwaysSetStrategy extends AgingCacheWriteStrategy_1.AgingCacheWriteStrategy {
set(key, value, _force) {
return this.executeSet(key, value);
}
load(key, value, evictAtLevel, _force) {
return this.executeSet(key, value, evictAtLevel);
}
}
exports.OverwriteAlwaysSetStrategy = OverwriteAlwaysSetStrategy;