4b7a4b6d6fe6beee87079abe3cb0d277fbd498be
[yaffs-website] / vendor / symfony / expression-language / ParserCache / ParserCacheInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\ExpressionLanguage\ParserCache;
13
14 use Symfony\Component\ExpressionLanguage\ParsedExpression;
15
16 /**
17  * @author Adrien Brault <adrien.brault@gmail.com>
18  */
19 interface ParserCacheInterface
20 {
21     /**
22      * Saves an expression in the cache.
23      *
24      * @param string           $key        The cache key
25      * @param ParsedExpression $expression A ParsedExpression instance to store in the cache
26      */
27     public function save($key, ParsedExpression $expression);
28
29     /**
30      * Fetches an expression from the cache.
31      *
32      * @param string $key The cache key
33      *
34      * @return ParsedExpression|null
35      */
36     public function fetch($key);
37 }