private function registerServices(ContainerBuilder $container, $config)
    {
        if ($config['annotation']['enabled']) {
            $this->verifyDoctrineBridgeExists('annotation');
            $container->register('cache.service.annotation', DoctrineCacheBridge::class)
                ->setFactory([DoctrineBridgeFactory::class, 'get'])
                ->addArgument(new Reference($config['annotation']['service_id']))
                ->addArgument($config['annotation'])
                ->addArgument(['annotation']);
        }

        if ($config['serializer']['enabled']) {
            $this->verifyDoctrineBridgeExists('serializer');
            $container->register('cache.service.serializer', DoctrineCacheBridge::class)
                ->setFactory([DoctrineBridgeFactory::class, 'get'])
                ->addArgument(new Reference($config['serializer']['service_id']))
                ->addArgument($config['serializer'])
                ->addArgument(['serializer']);
        }

        if ($config['validation']['enabled']) {
            $container->register('cache.service.validation', SymfonyValidatorBridge::class)
                ->setFactory([ValidationFactory::class, 'get'])
                ->addArgument(new Reference($config['validation']['service_id']))
                ->addArgument($config['validation']);
        }

        if ($config['session']['enabled']) {
            $container->register('cache.service.session', Psr6SessionHandler::class)
                ->setFactory([SessionHandlerFactory::class, 'get'])
                ->addArgument(new Reference($config['session']['service_id']))
                ->addArgument($config['session']);
        }

        if ($config['router']['enabled']) {
            $container->register('cache.service.router', CachingRouter::class)
                ->setFactory([RouterFactory::class, 'get'])
                ->setDecoratedService('router', null, 10)
                ->addArgument(new Reference($config['router']['service_id']))
                ->addArgument(new Reference('cache.service.router.inner'))
                ->addArgument($config['router']);
        }
    }