public static function addToCache($identifier, $accessor, array $data) {
    if (self::isCached($identifier, $accessor)) {
      throw new \Exception("Data for identifier '$identifier' and accessor '$accessor' is already present in
      this cache");
    }

    if (!in_array($identifier, self::$cache)) {
      self::$cache[$identifier] = [];
    }

    self::$cache[$identifier][$accessor] = $data;
  }