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\ExpressionLanguage\ParserCache;
14 use Symfony\Component\ExpressionLanguage\ParsedExpression;
17 * @author Adrien Brault <adrien.brault@gmail.com>
19 interface ParserCacheInterface
22 * Saves an expression in the cache.
24 * @param string $key The cache key
25 * @param ParsedExpression $expression A ParsedExpression instance to store in the cache
27 public function save($key, ParsedExpression $expression);
30 * Fetches an expression from the cache.
32 * @param string $key The cache key
34 * @return ParsedExpression|null
36 public function fetch($key);