function load($name): string {
    if (!isset($this->views[$name])) {
      $cacheKey = [__CLASS__, $name];
      $viewRenderer = $this->viewRenderer;

      /** @var \yii\caching\Cache $cache */
      $cache = $viewRenderer->cache;
      if ($viewRenderer->enableCaching && $cache->exists($cacheKey))
        $output = $cache->get($cacheKey);
      else {
        $path = FileHelper::localize($this->findViewFile($name));
        if (!is_file($path)) throw new InvalidCallException("The view file '$path' does not exist.");

        $output = @file_get_contents($path);
        if ($viewRenderer->enableCaching) $cache->set($cacheKey, $output, $viewRenderer->cachingDuration);
      }

      $this->views[$name] = $output;
    }

    return $this->views[$name];
  }