Skip to content

Commit d4999ed

Browse files
committed
Simply moving new section down a little lower - I believe some of the other options are a bit more common (totally subjective)
1 parent 654e6d0 commit d4999ed

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

components/http_foundation/session_configuration.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -102,36 +102,6 @@ method.
102102

103103
For the sake of clarity, some key options are explained in this documentation.
104104

105-
Session Cache Limiting
106-
~~~~~~~~~~~~~~~~~~~~~~
107-
108-
To avoid users seeing stale data, it's common for session-enabled resources to be
109-
sent with headers that disable caching. For this purpose PHP Sessions has the
110-
``sessions.cache_limiter`` option, which determines which headers, if any, will be
111-
sent with the response when the session in started.
112-
113-
Upon construction,
114-
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage`
115-
sets this global option to ``""`` (send no headers) in case the developer wishes to
116-
use a :class:`Symfony\\Component\\HttpFoundation\\Response` object to manage
117-
response headers.
118-
119-
.. caution::
120-
121-
If you rely on PHP Sessions to manage HTTP caching, you *must* manually set the
122-
``cache_limiter`` option in
123-
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage`
124-
to a non-empty value.
125-
126-
For example, you may set it to PHP's default value during construction:
127-
128-
Example usage::
129-
130-
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
131-
132-
$options['cache_limiter'] = session_cache_limiter();
133-
$storage = new NativeSessionStorage($options);
134-
135105
Session Cookie Lifetime
136106
~~~~~~~~~~~~~~~~~~~~~~~
137107

@@ -219,6 +189,36 @@ experience, for example, by displaying a message.
219189
Symfony records some basic metadata about each session to give you complete
220190
freedom in this area.
221191

192+
Session Cache Limiting
193+
~~~~~~~~~~~~~~~~~~~~~~
194+
195+
To avoid users seeing stale data, it's common for session-enabled resources to be
196+
sent with headers that disable caching. For this purpose PHP Sessions has the
197+
``sessions.cache_limiter`` option, which determines which headers, if any, will be
198+
sent with the response when the session in started.
199+
200+
Upon construction,
201+
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage`
202+
sets this global option to ``""`` (send no headers) in case the developer wishes to
203+
use a :class:`Symfony\\Component\\HttpFoundation\\Response` object to manage
204+
response headers.
205+
206+
.. caution::
207+
208+
If you rely on PHP Sessions to manage HTTP caching, you *must* manually set the
209+
``cache_limiter`` option in
210+
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage`
211+
to a non-empty value.
212+
213+
For example, you may set it to PHP's default value during construction:
214+
215+
Example usage::
216+
217+
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
218+
219+
$options['cache_limiter'] = session_cache_limiter();
220+
$storage = new NativeSessionStorage($options);
221+
222222
Session Metadata
223223
~~~~~~~~~~~~~~~~
224224

0 commit comments

Comments
 (0)