code: private function buildCacheService(ContainerBuilder $container, array $config)
      {
          // if cache disabled, swap it out with the dummy cache.
          if (!$config['enable_cache']) {
              $cache = $container->getDefinition('metamodels.cache');
              $cache->setClass(ArrayCache::class);
              $cache->setArguments([]);
              $container->setParameter('metamodels.cache_dir', null);
              return;
          }
  
          $container->setParameter('metamodels.cache_dir', $config['cache_dir']);
      }
docs: Build the cache service.
  
  @param ContainerBuilder $container The container builder.
  @param array            $config    The configuration.
  
  @return void