in production is useful to let the user configure an annotation cache
$cache = new ApcCache(); //or whatever
AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php');
if ($useSimpleAnnotationReader) {
// Register the ORM Annotations in the AnnotationRegistry
$reader = new SimpleAnnotationReader();
$reader->addNamespace('Doctrine\ORM\Mapping');
$cachedReader = new CachedReader($reader, $cache);
return new AnnotationDriver($cachedReader, (array) $paths);
}
return new AnnotationDriver(
new CachedReader(new AnnotationReader(), $cache),
(array) $paths
);
in production is useful to let the user configure an annotation cache
Is WIP because it should be improved: