Is this data being overwritten by another component? Is this data being overwritten by another component? symfony symfony

Is this data being overwritten by another component?


I think what you need to do is two separate CacheDrivers. See https://github.com/doctrine/cache/blob/master/lib/Doctrine/Common/Cache/CacheProvider.php for how namespaces are used there.

You could:

$validatorCacheDriver = new MemcacheWrapper();$validatorCacheDriver->setMemcache($memcache);$validatorCacheDriver->setNamespace('symfony_validator');$serializerCacheDriver = new MemcacheWrapper();$serializerCacheDriver->setMemcache($memcache);$serializerCacheDriver->setNamespace('symfony_serializer');// note that the two drivers are using the same memcache instance, // so only one connection will be used.$app['serializer.normalizers'] = function () use ($app, $serializerCacheDriver) {    $classMetadataFactory = new Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory(        new Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader(new AnnotationReader()), $serializerCacheDriver);    return [new Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer($classMetadataFactory) ];};$app->register(new Silex\Provider\ValidatorServiceProvider(), [    'validator.mapping.class_metadata_factory' =>        new \Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory(            new \Symfony\Component\Validator\Mapping\Loader\AnnotationLoader(new AnnotationReader()),            new \Symfony\Component\Validator\Mapping\Cache\DoctrineCache($validatorCacheDriver)        )]);

I've trimmed the code to only show the parts that play some part in the solution. I hope this helps!