UNPKG

@maximai/maxim-js

Version:

Maxim AI JS SDK. Visit https://getmaxim.ai for more info.

24 lines 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MaximInMemoryCache = void 0; class MaximInMemoryCache { constructor() { this.cache = new Map(); } getAllKeys() { return Promise.resolve(Array.from(this.cache.keys())); } get(key) { return Promise.resolve(this.cache.get(key) || null); } set(key, value) { this.cache.set(key, value); return Promise.resolve(); } delete(key) { this.cache.delete(key); return Promise.resolve(); } } exports.MaximInMemoryCache = MaximInMemoryCache; //# sourceMappingURL=inMemory.js.map