File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,26 @@ For a full list of the options and their meaning, see the
155
155
156
156
When you're in debug mode (the second argument of ``Kernel `` constructor in the
157
157
front controller is ``true ``), Symfony automatically adds an ``X-Symfony-Cache ``
158
- header to the response. Use this to get information about cache hits and misses.
158
+ header to the response. You can also use the ``trace_level `` config
159
+ option and set it to either ``none ``, ``short `` or ``full `` to
160
+ add this information.
161
+
162
+ ``short `` will add the information for the master request only.
163
+ It's written in a concise way that makes it easy to record the
164
+ information in your server log files. For example, in Apache you can
165
+ use ``%{X-Symfony-Cache}o `` in ``LogFormat `` format statements.
166
+ This information can be used to extract general information about
167
+ cache efficiency of your routes.
168
+
169
+ .. tip ::
170
+
171
+ You can change the name of the header used for the trace
172
+ information using the ``trace_header `` config option.
173
+
174
+ .. versionadded :: 4.3
175
+
176
+ The ``trace_level `` and ``trace_header `` configuration options
177
+ were introduced in Symfony 4.3.
159
178
160
179
.. _http-cache-symfony-versus-varnish :
161
180
You can’t perform that action at this time.
0 commit comments