@@ -189,6 +189,7 @@ Configuration
189
189
190
190
* `session `_
191
191
192
+ * `cache_limiter `_
192
193
* `cookie_domain `_
193
194
* `cookie_httponly `_
194
195
* `cookie_lifetime `_
@@ -1193,6 +1194,50 @@ cookie_path
1193
1194
This determines the path to set in the session cookie. By default, it will
1194
1195
use ``/ ``.
1195
1196
1197
+ cache_limiter
1198
+ .............
1199
+
1200
+ **type **: ``string `` or ``int `` **default **: ``'' ``
1201
+
1202
+ If set to ``0 ``, Symfony won't set any particular header related to the cache
1203
+ and it will rely on the cache control method configured in the
1204
+ `session.cache-limiter `_ PHP.ini option.
1205
+
1206
+ Unlike the other session options, ``cache_limiter `` is set as a regular
1207
+ :doc: `container parameter </service_container/parameters >`:
1208
+
1209
+ .. configuration-block ::
1210
+
1211
+ .. code-block :: yaml
1212
+
1213
+ # app/config/services.yml
1214
+ parameters :
1215
+ session.storage.options :
1216
+ cache_limiter : 0
1217
+
1218
+ .. code-block :: xml
1219
+
1220
+ <!-- app/config/services.xml -->
1221
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
1222
+ <container xmlns =" http://symfony.com/schema/dic/services"
1223
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1224
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
1225
+ https://symfony.com/schema/dic/services/services-1.0.xsd" >
1226
+
1227
+ <parameters >
1228
+ <parameter key =" session.storage.options" type =" collection" >
1229
+ <parameter key =" cache_limiter" >0</parameter >
1230
+ </parameter >
1231
+ </parameters >
1232
+ </container >
1233
+
1234
+ .. code-block :: php
1235
+
1236
+ // app/config/services.php
1237
+ $container->setParameter('session.storage.options', [
1238
+ 'cache_limiter' => 0,
1239
+ ]);
1240
+
1196
1241
cookie_domain
1197
1242
.............
1198
1243
@@ -2776,3 +2821,4 @@ to know their differences.
2776
2821
.. _`default_socket_timeout` : https://php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
2777
2822
.. _`PEM formatted` : https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail
2778
2823
.. _`haveibeenpwned.com` : https://haveibeenpwned.com/
2824
+ .. _`session.cache-limiter` : https://www.php.net/manual/en/session.configuration.php#ini.session.cache-limiter
0 commit comments