debian-mirror-gitlab/app/assets/javascripts/lib/utils/cache.js

18 lines
298 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
export default class Cache {
2017-09-10 17:25:29 +05:30
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];
}
}