code: function PromiseCache () {
    var cache = this.cache = {};
  
    this.get = function (key, promiseGenerator) {
      if (key in cache) {
        return cache[key];
      }
      cache[key] = promiseGenerator();
      return cache[key];
    };
  }
docs: Get or create a promise given a key and promise generator.
  @todo Move to a utility and use in other parts of A-Frame.