Skip to content

ESI Variable Details Continuation #4338

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
Oct 19, 2014
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
Next Next commit
Update http_cache.rst
Explained how the parameters are passed to the controller - named parameters
  • Loading branch information
Farkie authored and weaverryan committed Oct 18, 2014
commit 5877d02d5eb5b7d3eba28ed26a84a2277bf560f4
13 changes: 13 additions & 0 deletions book/http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,19 @@ wondering why you would want to use a helper instead of just writing the ESI
tag yourself. That's because using a helper makes your application work even
if there is no gateway cache installed.

.. tip::

Using render_esi with parameters doesn't use request variables - they are
passed in as named parameters. They must be named the same.

e.g. ``render_esi(controller('...:content', { max_per_page: 5, type: 'news' }``

.. code-block:: php

public function content($max_per_page = 10, $type = "news")
{


When using the default ``render`` function (or setting the renderer to
``inline``), Symfony merges the included page content into the main one
before sending the response to the client. But if you use the ``esi`` renderer
Expand Down