Skip to content

Commit 56f05a8

Browse files
committed
Tweaks
1 parent 622934c commit 56f05a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

session.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ logged in by destroying the session after a certain period of idle time. For
412412
example, it is common for banking applications to log the user out after just
413413
5 to 10 minutes of inactivity. Setting the cookie lifetime here is not
414414
appropriate because that can be manipulated by the client, so we must do the expiry
415-
on the server side. The easiest way is to implement this via garbage collection
415+
on the server side. The easiest way is to implement this via :ref:`session garbage collection <session-garbage-collection>`
416416
which runs reasonably frequently. The ``cookie_lifetime`` would be set to a
417417
relatively high value, and the garbage collection ``gc_maxlifetime`` would be set
418418
to destroy sessions at whatever the desired idle period is.
@@ -446,6 +446,8 @@ particular cookie by reading the ``getLifetime()`` method::
446446
The expiry time of the cookie can be determined by adding the created
447447
timestamp and the lifetime.
448448

449+
.. _session-garbage-collection:
450+
449451
Configuring Garbage Collection
450452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
451453

@@ -468,9 +470,10 @@ configuration:
468470

469471
.. code-block:: yaml
470472
471-
# config.yml
473+
# config/packages/framework.yaml
472474
framework:
473475
session:
476+
# ...
474477
gc_probability: null
475478
476479
You can configure these settings by passing ``gc_probability``, ``gc_divisor``

0 commit comments

Comments
 (0)