DoctrineCache

class DoctrineCache implements CacheInterface

Adapts a Doctrine cache to a CacheInterface.

Methods

__construct(Cache $cache)
setCache(Cache $cache)
has(string $class)

Returns whether metadata for the given class exists in the cache.

ClassMetadata|false read(string $class)

Returns the metadata for the given class from the cache.

write(ClassMetadata $metadata)

Stores a class metadata in the cache.

Details

__construct(Cache $cache)

Parameters

Cache $cache

setCache(Cache $cache)

Parameters

Cache $cache

has(string $class)

Returns whether metadata for the given class exists in the cache.

Parameters

string $class

ClassMetadata|false read(string $class)

Returns the metadata for the given class from the cache.

Parameters

string $class Class Name

Return Value

ClassMetadata|false A ClassMetadata instance or false on miss

write(ClassMetadata $metadata)

Stores a class metadata in the cache.

Parameters

ClassMetadata $metadata

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.html