$sessionName
$sessionName :
Session handler using the mongodb/mongodb package and MongoDB driver extension.
__construct(\MongoDB\Client $mongo, array $options)
Constructor.
List of available options:
It is strongly recommended to put an index on the expiry_field for
garbage-collection. Alternatively it's possible to automatically expire
the sessions in the database as described below:
A TTL collections can be used on MongoDB 2.2+ to cleanup expired sessions automatically. Such an index can for example look like this:
db.<session-collection>.ensureIndex(
{ "<expiry-field>": 1 },
{ "expireAfterSeconds": 0 }
)
More details on: https://docs.mongodb.org/manual/tutorial/expire-data/
If you use such an index, you can drop gc_probability to 0 since
no garbage-collection is required.
| \MongoDB\Client | $mongo | |
| array | $options |
When "database" or "collection" not provided
doWrite(\Symfony\Component\HttpFoundation\Session\Storage\Handler\string $sessionId, \Symfony\Component\HttpFoundation\Session\Storage\Handler\string $data) : boolean
| \Symfony\Component\HttpFoundation\Session\Storage\Handler\string | $sessionId | |
| \Symfony\Component\HttpFoundation\Session\Storage\Handler\string | $data |