ZF2 Zend\Form\Annotation\AnnotationBuilder Caching

For programming and general questions on Zend Framework
Post Reply
Posts: 12
Joined: Wed Nov 23, 2011 8:12 pm

ZF2 Zend\Form\Annotation\AnnotationBuilder Caching

Post by noisemc » Tue Jul 16, 2013 3:33 pm

I couldn't find any caching mechanism for Annotations used to build Forms.

Normally in Doctrine2 you can do this:

Code: Select all

use Doctrine\Common\Annotations\FileCacheReader;
use Doctrine\Common\Annotations\AnnotationReader;

$reader = new FileCacheReader(
    new AnnotationReader(),
    $debug = true
AnnotationBuilder uses DocParser through AnnotationManager that does not seem to be allowing to cache Annotation based form config unlike AnnotationReader that does allow to cache Annotations for all entites.

Is there any way - other than storing Form objects in cache to make working with AnnotationBuilder easier and more efficient so it doesn't have to parse Annotations every time the script loads?

Post Reply