Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cache.js « utils « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 45048145139bc9d8f97cf35ad1339534b97fc719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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];
  }
}