Skip to content
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

DOCSP-45065: sessions page quick fix #3256

Merged
merged 6 commits into from
Jan 29, 2025
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
16 changes: 8 additions & 8 deletions docs/sessions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ following ways:
The following list describes other driver options that you can set in
the ``options`` array:

- ``id_field``: Field name for storing the session ID (default: ``_id``)
- ``data_field``: Field name for storing the session data (default: ``data``)
- ``time_field``: Field name for storing the timestamp (default: ``time``)
- ``expiry_field``: Field name for storing the expiry-timestamp (default: ``expires_at``)
- ``id_field``: Custom field name for storing the session ID (default: ``_id``)
- ``data_field``: Custom field name for storing the session data (default: ``data``)
- ``time_field``: Custom field name for storing the timestamp (default: ``time``)
- ``expiry_field``: Custom field name for storing the expiry timestamp (default: ``expires_at``)
- ``ttl``: Time to live in seconds

We recommend that you create an index on the ``expiry_field`` field for
Expand All @@ -86,12 +86,12 @@ the following code:
.. code-block:: php

Schema::create('sessions', function (Blueprint $collection) {
$collection->expire('expiry_field', 0);
$collection->expire('expires_at', 0);
});

Setting the time value to ``0`` in the index
definition instructs MongoDB to expire documents at the clock time
specified in the ``expiry_field`` field.
Setting the time value to ``0`` in the index definition instructs
MongoDB to expire documents at the clock time specified in the
``expires_at`` field.

To learn more about using the ``Schema`` builder to create indexes, see
the :ref:`laravel-schema-builder-special-idx` section of the Schema
Expand Down
Loading