File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ MongoDbStore
225
225
226
226
The MongoDbStore saves locks on a MongoDB server, it requires a ``\MongoDB\Client ``
227
227
connection from `mongodb/mongodb `_.
228
- This store does not support blocking, and expects a TTL to avoid stalled locks::
228
+ This store does not support blocking and expects a TTL to avoid stalled locks::
229
229
230
230
use Symfony\Component\Lock\Store\MongoDbStore;
231
231
@@ -480,7 +480,7 @@ For more details see: https://docs.mongodb.com/manual/reference/limits/#Index-Ke
480
480
481
481
A TTL index MUST BE used on MongoDB 2.2+ to automatically clean up expired locks.
482
482
483
- Such an index can for example look like this :
483
+ Such an index can be created manually :
484
484
485
485
.. code-block :: javascript
486
486
@@ -489,6 +489,9 @@ Such an index can for example look like this:
489
489
{ " expireAfterSeconds" : 0 }
490
490
)
491
491
492
+ Alternatively, the method ``MongoDbStore::createTTLIndex() `` can be called once
493
+ to create the TTL index during setup.
494
+
492
495
For more details see: http://docs.mongodb.org/manual/tutorial/expire-data/
493
496
494
497
writeConcern, readConcern and readPreference are not specified by MongoDbStore
You can’t perform that action at this time.
0 commit comments