Skip to content

Add _route to docs explicitly #137

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 1 commit into from
Aug 14, 2014
Merged
Changes from all commits
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
52 changes: 40 additions & 12 deletions Resources/doc/reference/configuration/match.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All criteria are regular expressions. For instance:
path: ^/$

host
""""
----

**type**: ``string``

Expand All @@ -30,15 +30,15 @@ serve more than one host from your Symfony application.
your caching proxy never caches the editing domain.

path
""""
----

**type**: ``string``

For example, ``path: ^/`` will match every request. To only match the home
page, use ``path: ^/$``.

methods
"""""""
-------

**type**: ``array``

Expand All @@ -52,7 +52,7 @@ even when you set the methods here:
methods: [PUT, DELETE]

ips
"""
---

**type**: ``array``

Expand All @@ -67,15 +67,43 @@ client IP addresses.
documentation.

attributes
""""""""""
----------

**type**: ``array``

An array to filter on route attributes. the most common use case would be
``_controller`` when you need caching rules applied to a controller. Note that
this is the controller name used in the route, so it depends on your route
configuration whether you need ``Bundle:Name:action`` or
``service.id:methodName`` (if you defined your `controllers as services`_).
An array of request attributes to match against. Each attribute is interpreted
as a regular expression.

_controller
^^^^^^^^^^^

**type**: ``string``

Controller name regular expression. Note that this is the controller name used
in the route, so it depends on your route configuration whether you need
``Bundle:Name:action`` or ``service.id:methodName`` (if you defined your
`controllers as services`_).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be changed for #134, but in a separate PR.


_route
^^^^^^

**type**: ``string``

Route name regular expression. To match a single route:

.. code-block:: yaml

match:
attributes:
route: ^articles_index$

To match multiple routes:

.. code-block:: yaml

match:
attributes:
route: ^articles.*|news$

Note that even for the request attributes, your criteria are interpreted as
regular expressions.
Expand All @@ -88,7 +116,7 @@ regular expressions.
.. _additional_cacheable_status:

additional_cacheable_status
"""""""""""""""""""""""""""
---------------------------

**type**: ``array``

Expand All @@ -103,7 +131,7 @@ the rule.
.. _match_response:

match_response
""""""""""""""
--------------

**type**: ``string``

Expand Down