Skip to content

Commit 993912d

Browse files
committed
Merge pull request #164 from FriendsOfSymfony/fix-route-doc
Fix route config in docs
2 parents 92c70f1 + 998827a commit 993912d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Resources/doc/reference/configuration/user-context.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ triggered:
3333
3434
# app/config/routing.yml
3535
user_context_hash:
36-
/user-context-hash
36+
path: /user-context-hash
3737
3838
.. important::
3939

@@ -66,8 +66,8 @@ automatically enabled if you configure any of the ``user_context`` options.
6666
6767
# app/config/config.yml
6868
fos_http_cache:
69-
user_context:
70-
enabled: true
69+
user_context:
70+
enabled: true
7171
7272
hash_header
7373
~~~~~~~~~~~
@@ -109,9 +109,9 @@ If set, ``accept`` and ``method`` will be ignored.
109109
hash_cache_ttl
110110
~~~~~~~~~~~~~~
111111

112-
**type**: ``integer`` **default**: `0`
112+
**type**: ``integer`` **default**: ``0``
113113

114-
Time in seconds that context hash responses will be cached. Value `0` means
114+
Time in seconds that context hash responses will be cached. Value ``0`` means
115115
caching is disabled. For performance reasons, it makes sense to cache the hash
116116
generation response; after all, each content request may trigger a hash
117117
request. However, when you decide to cache hash responses, you must invalidate
@@ -154,10 +154,10 @@ for 15 minutes, configure:
154154
155155
# app/config/config.yml
156156
fos_http_cache:
157-
user_context:
158-
user_identifier_headers:
159-
- Authorization
160-
hash_cache_ttl: 900
157+
user_context:
158+
user_identifier_headers:
159+
- Authorization
160+
hash_cache_ttl: 900
161161
162162
role_provider
163163
~~~~~~~~~~~~~
@@ -173,8 +173,8 @@ all roles are added to the hash:
173173
174174
# app/config/config.yml
175175
fos_http_cache
176-
user_context:
177-
role_provider: true
176+
user_context:
177+
role_provider: true
178178
179179
.. _custom-context-providers:
180180

@@ -192,9 +192,9 @@ is generated.
192192
.. code-block:: yaml
193193
194194
acme.demo_bundle.my_service:
195-
class: "%acme.demo_bundle.my_service.class%"
196-
tags:
197-
- { name: fos_http_cache.user_context_provider }
195+
class: "%acme.demo_bundle.my_service.class%"
196+
tags:
197+
- { name: fos_http_cache.user_context_provider }
198198
199199
.. code-block:: xml
200200

0 commit comments

Comments
 (0)