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

Remove persistent sessions section from persistence.md #56

Draft
wants to merge 1 commit into
base: 1.14.x
Choose a base branch
from
Draft
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
30 changes: 0 additions & 30 deletions docs/book/persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,33 +83,3 @@ Considering that persistence implementations also _create_ the session instance,
we recommend that implementations only create instances that implement the
`SessionIdentifierAwareInterface` going forward in order to make themselves
async compatible.

## Persistent sessions

- Since 1.2.0.

If your persistence implementation supports persistent sessions — for
example, by setting an `Expires` or `Max-Age` cookie directive — then you
can opt to globally set a default session duration, or allow developers to hint
a desired session duration via the session container using
`SessionContainerPersistenceInterface::persistSessionFor()`.

Implementations SHOULD honor the value of `SessionContainerPersistenceInterface::getSessionLifetime()`
when persisting the session data. This could mean either or both of the
following:

- Ensuring that the session data will not be purged until after the specified
TTL value.
- Setting an `Expires` or `Max-Age` cookie directive.

In each case, the persistence engine should query the `Session` instance for a
TTL value:

```php
$ttl = $session instanceof SessionContainerPersistenceInterface
? $session->getSessionLifetime()
: $defaultLifetime; // likely 0, to indicate automatic expiry
```

`getSessionLifetime()` returns an `integer` value indicating the number of
seconds the session should persist.