I am using Symfony CMF, PHPCR and SncRedisBundle. I want to add metadata and nodes caching for PHPCR to SncRedisBundle.
For testing purposes, I have modified the loadDoctrine function in the file Snc\RedisBundle\DependencyInjection\SncRedisExtension.php (see the comment "PHPCR metadata definition override" for the code that I have added, 1 line).
protected function loadDoctrine(array $config, ContainerBuilder $container)
{
    foreach ($config['doctrine'] as $name => $cache) {
        $client = new Reference(sprintf('snc_redis.%s_client', $cache['client']));
        foreach ($cache['entity_managers'] as $em) {
            $def = new Definition($container->getParameter('snc_redis.doctrine_cache.class'));
            $def->setScope(ContainerInterface::SCOPE_CONTAINER);
            $def->addMethodCall('setRedis', array($client));
            if ($cache['namespace']) {
                $def->addMethodCall('setNamespace', array($cache['namespace']));
            }
            $container->setDefinition(sprintf('doctrine.orm.%s_%s', $em, $name), $def);
        }
        foreach ($cache['document_managers'] as $dm) {
            $def = new Definition($container->getParameter('snc_redis.doctrine_cache.class'));
            $def->setScope(ContainerInterface::SCOPE_CONTAINER);
            $def->addMethodCall('setRedis', array($client));
            if ($cache['namespace']) {
                $def->addMethodCall('setNamespace', array($cache['namespace']));
            }
            $container->setDefinition(sprintf('doctrine.odm.mongodb.%s_%s', $dm, $name), $def);
            //PHPCR metadata definition override
            $container->setDefinition(sprintf('doctrine_phpcr.odm.%s_%s', $dm, $name), $def);
        }
    }
}
This works for overriding the metadata cache and I can see in the Redis database that the metadata entries get populated.
Now I want to override the nodes result cache but I can't seem to find a way to do that. I cannot find the service definition name to use for the override. Can anyone point me in the right direction for this?
 
    