2017-12-07 06:09:17 -05:00
|
|
|
export default class Cache {
|
2017-05-16 06:01:23 -04:00
|
|
|
constructor() {
|
2018-10-10 02:25:43 -04:00
|
|
|
this.internalStorage = {};
|
2017-05-16 06:01:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
get(key) {
|
|
|
|
return this.internalStorage[key];
|
|
|
|
}
|
|
|
|
|
|
|
|
hasData(key) {
|
|
|
|
return Object.prototype.hasOwnProperty.call(this.internalStorage, key);
|
|
|
|
}
|
|
|
|
|
|
|
|
remove(key) {
|
|
|
|
delete this.internalStorage[key];
|
|
|
|
}
|
|
|
|
}
|