PrefixingKeyValueCache.js 618 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.PrefixingKeyValueCache = void 0;
  4. class PrefixingKeyValueCache {
  5. constructor(wrapped, prefix) {
  6. this.wrapped = wrapped;
  7. this.prefix = prefix;
  8. }
  9. get(key) {
  10. return this.wrapped.get(this.prefix + key);
  11. }
  12. set(key, value, options) {
  13. return this.wrapped.set(this.prefix + key, value, options);
  14. }
  15. delete(key) {
  16. return this.wrapped.delete(this.prefix + key);
  17. }
  18. }
  19. exports.PrefixingKeyValueCache = PrefixingKeyValueCache;
  20. //# sourceMappingURL=PrefixingKeyValueCache.js.map