@spotify/web-api-ts-sdk
Version:
A typescript SDK for the Spotify Web API
19 lines • 475 B
JavaScript
import GenericCache from "./GenericCache.js";
export default class InMemoryCachingStrategy extends GenericCache {
constructor() {
super(new DictionaryCacheStore());
}
}
class DictionaryCacheStore {
cache = new Map();
get(key) {
return this.cache.get(key) ?? null;
}
set(key, value) {
this.cache.set(key, value);
}
remove(key) {
this.cache.delete(key);
}
}
//# sourceMappingURL=InMemoryCachingStrategy.js.map