4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Mapping\Cache;
14 use Symfony\Component\Validator\Mapping\ClassMetadata;
17 * Persists ClassMetadata instances in a cache.
19 * @author Bernhard Schussek <bschussek@gmail.com>
21 interface CacheInterface
24 * Returns whether metadata for the given class exists in the cache.
26 * @param string $class
28 public function has($class);
31 * Returns the metadata for the given class from the cache.
33 * @param string $class Class Name
35 * @return ClassMetadata|false A ClassMetadata instance or false on miss
37 public function read($class);
40 * Stores a class metadata in the cache.
42 * @param ClassMetadata $metadata A Class Metadata
44 public function write(ClassMetadata $metadata);