Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31939d5

Browse files
committed
[#7064] Added versionadded and slightly changed the text
1 parentf60669f commit31939d5

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

‎components/expression_language/caching.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,24 @@ The ``evaluate()`` method needs to loop through the "nodes" (pieces of an
2525
expression saved in the ``ParsedExpression``) and evaluate them on the fly.
2626

2727
To save time, the ``ExpressionLanguage`` caches the ``ParsedExpression`` so
28-
it can skip the tokenize and parse steps with duplicate expressions.
29-
Thecaching is done by a `CacheItemPoolInterface`_ instance (by default, it uses an
30-
:class:`Symfony\\Component\\Cache\\Adapter\\ArrayAdapter`).
31-
You cancustomize 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 aPSR-6`CacheItemPoolInterface`_ instance (by default, it
30+
uses an:class:`Symfony\\Component\\Cache\\Adapter\\ArrayAdapter`). You can
31+
customize this by creating a customcache pool or using one of the available
32+
ones and injecting this using the constructor::
3333

3434
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
3535
use Symfony\Component\Cache\Adapter\RedisAdapter;
3636

3737
$cache = new RedisAdapter(...);
3838
$language = new ExpressionLanguage($cache);
3939

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+
4046
..seealso::
4147

4248
See the:doc:`/components/cache` documentation for more information about

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp