The instructions for setting up caching on the http://php-annotations.readthedocs.org/en/latest/ConsumingAnnotations.html page are absolutely incorrect.
They say 2 things:
- the
AnnotationManager has cachePath public property
- the following code snippet would enable caching:
Annotations::$config = array(
'cachePath' => sys_get_temp_dir(),
'fileMode' => 0777,
);
Probably at some point the caching code was extracted into AnnotationCache class, which has above mentioned properties as constructor arguments.
This way now to make it work following code needs to be used:
Annotations::$config = array(
'cache' => new AnnotationCache(sys_get_temp_dir(), 0777),
);
The instructions for setting up caching on the http://php-annotations.readthedocs.org/en/latest/ConsumingAnnotations.html page are absolutely incorrect.
They say 2 things:
AnnotationManagerhascachePathpublic propertyProbably at some point the caching code was extracted into
AnnotationCacheclass, which has above mentioned properties as constructor arguments.This way now to make it work following code needs to be used: