code: async function fetchData(key, transformation, cacheMiss) {
  
      // TODO: needs better caching logic
      var data = cache.get(key);
  
      if (data) {
          return data;
      }
  
      try {
          data = transformation(await cacheMiss());
      } catch (err) {
          throw new Error('The response contains invalid data');
      }
  
      cache.put(key, data);
      return data;
  }
docs: Tries to fetch the response from the cache and provides fallback if not found
  
  @param {string} key - Key of the data in the cache
  @param {function} transformation - Transformation of the data
  @param {function} cacheMiss - Handler in case of the data is not found in the cache
  @returns {*}