code: function clear() {
    timeouts.forEach((callback, timeout) => {
      clearTimeout(timeout);
  
      // reject Promise or execute callback which returns Error
      callback();
    });
  
    const length = size();
    cache.clear();
    return length;
  }
docs: Removes all elements stored in cache and clears all timeouts.
  
  @returns {number} how much elements was removed from cache