Skip to content

Incorrect examples for setting up caching in documentation #108

@aik099

Description

@aik099

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:

  1. the AnnotationManager has cachePath public property
  2. 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),
);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions