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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
297 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() {
2018-12-13 13:39:08 +05:30
this.internalStorage = {};
2017-09-10 17:25:29 +05:30
}
get(key) {
return this.internalStorage[key];
}
hasData(key) {
return Object.prototype.hasOwnProperty.call(this.internalStorage, key);
}
remove(key) {
delete this.internalStorage[key];
}
}