Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit75febdc

Browse files
mpdudewouterj
authored andcommitted
[HttpKernel] Documenttrace_level andtrace_header config options inHttpCache
1 parent337a9e2 commit75febdc

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎http_cache.rst‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,26 @@ For a full list of the options and their meaning, see the
155155

156156
When you're in debug mode (the second argument of ``Kernel`` constructor in the
157157
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.
159178

160179
.. _http-cache-symfony-versus-varnish:
161180

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp