Skip to content

Document the session.cache_limiter parameter #12018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Configuration

* `session`_

* `cache_limiter`_
* `cookie_domain`_
* `cookie_httponly`_
* `cookie_lifetime`_
Expand Down Expand Up @@ -867,6 +868,50 @@ cookie_path
This determines the path to set in the session cookie. By default, it will
use ``/``.

cache_limiter
.............

**type**: ``string`` or ``int`` **default**: ``''``

If set to ``0``, Symfony won't set any particular header related to the cache
and it will rely on the cache control method configured in the
`session.cache-limiter`_ PHP.ini option.

Unlike the other session options, ``cache_limiter`` is set as a regular
:doc:`container parameter </service_container/parameters>`:

.. configuration-block::

.. code-block:: yaml

# app/config/services.yml
parameters:
session.storage.options:
cache_limiter: 0

.. code-block:: xml

<!-- app/config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd">

<parameters>
<parameter key="session.storage.options" type="collection">
<parameter key="cache_limiter">0</parameter>
</parameter>
</parameters>
</container>

.. code-block:: php

// app/config/services.php
$container->setParameter('session.storage.options', [
'cache_limiter' => 0,
]);

cookie_domain
.............

Expand Down Expand Up @@ -2332,3 +2377,4 @@ to know their differences.
.. _`blue/green deployment`: http://martinfowler.com/bliki/BlueGreenDeployment.html
.. _`gulp-rev`: https://www.npmjs.com/package/gulp-rev
.. _`webpack-manifest-plugin`: https://www.npmjs.com/package/webpack-manifest-plugin
.. _`session.cache-limiter`: https://www.php.net/manual/en/session.configuration.php#ini.session.cache-limiter