Skip to content

Commit be60602

Browse files
committed
[symfony#3260] Minor tweaks when proofreading
1 parent 180fc13 commit be60602

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/expression_language/caching.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
.. index::
22
single: Caching; ExpressionLanguage
33

4-
Caching Expressions Using ParserCaches
5-
======================================
4+
Caching Expressions Using Parser Caches
5+
=======================================
66

77
The ExpressionLanguage component already provides a
8-
:method:`Symfony\\Component\\ExpresionLanguage\\ExpressionLanguage::compile`
8+
:method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::compile`
99
method to be able to cache the expressions in plain PHP. But internally, the
1010
component also caches the parsed expressions, so duplicated expressions can be
1111
compiled/evaluated quicker.
1212

1313
The Workflow
1414
------------
1515

16-
Both ``evaluate`` and ``compile`` needs to do some things before it can
16+
Both ``evaluate`` and ``compile`` need to do some things before each can
1717
provide the return values. For ``evaluate``, this overhead is even bigger.
1818

1919
Both methods need to tokenize and parse the expression. This is done by the
2020
:method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::parse`
21-
method. It'll return a :class:`Symfony\\Component\\ExpressionLanguage\\ParsedExpression`.
21+
method. It returns a :class:`Symfony\\Component\\ExpressionLanguage\\ParsedExpression`.
2222
Now, the ``compile`` method just returns the string conversion of this object.
2323
The ``evaluate`` method needs to loop through the "nodes" (pieces of an
2424
expression saved in the ``ParsedExpression``) and evaluate them on the fly.
2525

26-
To save time, the ``ExpressionLanguage`` caches the ``ParsedExpression``, so
26+
To save time, the ``ExpressionLanguage`` caches the ``ParsedExpression`` so
2727
it can skip the tokenize and parse steps with duplicate expressions.
2828
The caching is done by a
2929
:class:`Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface`

0 commit comments

Comments
 (0)