File tree 1 file changed +11
-5
lines changed
components/expression_language
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,24 @@ The ``evaluate()`` method needs to loop through the "nodes" (pieces of an
25
25
expression saved in the ``ParsedExpression ``) and evaluate them on the fly.
26
26
27
27
To save time, the ``ExpressionLanguage `` caches the ``ParsedExpression `` so
28
- it can skip the tokenize and parse steps with duplicate expressions.
29
- The caching is done by a `CacheItemPoolInterface `_ instance (by default, it uses an
30
- :class: `Symfony\\ Component\\ Cache\\ Adapter\\ ArrayAdapter `).
31
- You can customize this by creating a custom `` Cache `` and injecting this
32
- in the object using the constructor::
28
+ it can skip the tokenize and parse steps with duplicate expressions. The
29
+ caching is done by a PSR-6 `CacheItemPoolInterface `_ instance (by default, it
30
+ uses an :class: `Symfony\\ Component\\ Cache\\ Adapter\\ ArrayAdapter `). You can
31
+ customize this by creating a custom cache pool or using one of the available
32
+ ones and injecting this using the constructor::
33
33
34
34
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
35
35
use Symfony\Component\Cache\Adapter\RedisAdapter;
36
36
37
37
$cache = new RedisAdapter(...);
38
38
$language = new ExpressionLanguage($cache);
39
39
40
+ .. versionadded :: 3.2
41
+ PSR-6 caching support was introduced in Symfony 3.2. Prior to version 3.2,
42
+ a
43
+ :class: `Symfony\\ Component\\ ExpressionLanguage\\ ParserCache\\ ParserCacheInterface `
44
+ instance had to be injected.
45
+
40
46
.. seealso ::
41
47
42
48
See the :doc: `/components/cache ` documentation for more information about
You can’t perform that action at this time.
0 commit comments