Skip to content

Commit 178c5d7

Browse files
committed
Reword
1 parent 57c0337 commit 178c5d7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

reference/configuration/framework.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -803,12 +803,20 @@ outgoing network interface.
803803
buffer
804804
......
805805

806-
**type**: ``bool`` | ``string``
806+
**type**: ``bool`` | ``Closure``
807807

808-
Option that allows to buffer the content of the response and access it multiple times without performing the request again.
809-
If boolean value given, request will be buffered or not according to the boolean value. If a string is given, this should
810-
be a regex matching the response content-types that
811-
should be buffered
808+
Buffering the response means that you can access its content multiple times
809+
without performing the request again. Buffering is enabled by default when the
810+
content type of the response is ``text/*``, ``application/json`` or ``application/xml``.
811+
812+
If this option is a boolean value, the response is buffered when the value is
813+
``true``. If this option is a closure, the response is buffered when the
814+
returned value is ``true`` (the closure receives as argument an array with the
815+
response headers).
816+
817+
.. versionadded:: 4.4
818+
819+
The support of ``Closure`` in the ``buffer`` option was introduced in Symfony 4.4.
812820

813821
cafile
814822
......

0 commit comments

Comments
 (0)