private function getOrmCacheDriverNode($name)
    {
        $treeBuilder = new TreeBuilder($name);

        if (method_exists($treeBuilder, 'getRootNode')) {
            $node = $treeBuilder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $node = $treeBuilder->root($name);
        }

        $node
            ->addDefaultsIfNotSet()
            ->beforeNormalization()
                ->ifString()
                ->then(static function ($v) : array {
                    return ['type' => $v];
                })
            ->end()
            ->beforeNormalization()
                ->ifTrue(static function ($v) : bool {
                    return is_array($v) && array_key_exists('cache_provider', $v);
                })
                ->then(static function ($v) : array {
                    return ['type' => 'provider'] + $v;
                })
            ->end()
            ->children()
                ->scalarNode('type')->defaultValue('array')->end()
                ->scalarNode('id')->end()
                ->scalarNode('pool')->end()
                ->scalarNode('host')->end()
                ->scalarNode('port')->end()
                ->scalarNode('database')->end()
                ->scalarNode('instance_class')->end()
                ->scalarNode('class')->end()
                ->scalarNode('namespace')->defaultNull()->end()
                ->scalarNode('cache_provider')->defaultNull()->end()
            ->end();

        return $node;
    }