gitlab-org--gitlab-foss/app/assets/javascripts/lib/utils/cache.js
2017-12-07 11:09:17 +00:00

17 lines
298 B
JavaScript

export default class Cache {
constructor() {
this.internalStorage = { };
}
get(key) {
return this.internalStorage[key];
}
hasData(key) {
return Object.prototype.hasOwnProperty.call(this.internalStorage, key);
}
remove(key) {
delete this.internalStorage[key];
}
}