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

Appearance settings

Commit be60602

Browse filesBrowse files
committed
[#3260] Minor tweaks when proofreading
1 parent 180fc13 commit be60602
Copy full SHA for be60602

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed

‎components/expression_language/caching.rst

Copy file name to clipboardExpand all lines: components/expression_language/caching.rst
+6-6Lines changed: 6 additions & 6 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.