@@ -33,7 +33,7 @@ triggered:
33
33
34
34
# app/config/routing.yml
35
35
user_context_hash :
36
- /user-context-hash
36
+ path : /user-context-hash
37
37
38
38
.. important ::
39
39
@@ -66,8 +66,8 @@ automatically enabled if you configure any of the ``user_context`` options.
66
66
67
67
# app/config/config.yml
68
68
fos_http_cache :
69
- user_context :
70
- enabled : true
69
+ user_context :
70
+ enabled : true
71
71
72
72
hash_header
73
73
~~~~~~~~~~~
@@ -109,9 +109,9 @@ If set, ``accept`` and ``method`` will be ignored.
109
109
hash_cache_ttl
110
110
~~~~~~~~~~~~~~
111
111
112
- **type **: ``integer `` **default **: `0 `
112
+ **type **: ``integer `` **default **: `` 0 ` `
113
113
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
115
115
caching is disabled. For performance reasons, it makes sense to cache the hash
116
116
generation response; after all, each content request may trigger a hash
117
117
request. However, when you decide to cache hash responses, you must invalidate
@@ -154,10 +154,10 @@ for 15 minutes, configure:
154
154
155
155
# app/config/config.yml
156
156
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
161
161
162
162
role_provider
163
163
~~~~~~~~~~~~~
@@ -173,8 +173,8 @@ all roles are added to the hash:
173
173
174
174
# app/config/config.yml
175
175
fos_http_cache
176
- user_context :
177
- role_provider : true
176
+ user_context :
177
+ role_provider : true
178
178
179
179
.. _custom-context-providers :
180
180
@@ -192,9 +192,9 @@ is generated.
192
192
.. code-block :: yaml
193
193
194
194
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 }
198
198
199
199
.. code-block :: xml
200
200
0 commit comments