8000 [ExpressionLanguage] Documented Caching Strategies by wouterj · Pull Request #3260 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[ExpressionLanguage] Documented Caching Strategies #3260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 3, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added doctrine note
  • Loading branch information
wouterj committed Dec 2, 2013
commit 0a59f6d4956ccbfe2b58326969c166cd1c14f6f8
9 changes: 9 additions & 0 deletions components/expression_language/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ in the object using the constructor::
$cache = new MyDatabaseParserCache(...);
$language = new ExpressionLanguage($cache);

.. note::

The `DoctrineBridge`_ has a ParserCache implementation using the
`doctrine cache library`_, which gives you caching for all sorts of cache
strategies, like Apc, Filesystem and Apc.

Using Parsed and Serialized Expressions
---------------------------------------

Expand All @@ -59,3 +65,6 @@ Both ``evaluate`` and ``compile`` can handle ``ParsedExpression`` and
$expression = new SerializedParsedExpression(serialize($language->parse('1 + 4')));

echo $language->evaluate($expression); // prints 5

.. _DoctrineBridge: https://github.com/symfony/DoctrineBridge
.. _`doctrine cache library`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html
0