code: private function getCache(Container $container, $cacheDefinition): Cache
      {
          $cacheType = $cacheDefinition['type'];
          $cacheOptions = $cacheDefinition['options'] ?? [];
  
          $cacheFactory = $container[sprintf('doctrine.dbal.db.cache_factory.%s', $cacheType)];
  
          return $cacheFactory($cacheOptions);
      }
docs: @param Container    $container
  @param string|array $cacheDefinition
  
  @return Cache