File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,13 @@ Setting Up the MongoDB Collection
159159---------------------------------
160160
161161Because MongoDB uses dynamic collection schemas, you do not need to do anything to initialize your
162- session collection.
162+ session collection. However, you may want to add an index to improve garbage collection performance.
163+ From the `MongoDB shell `_:
163164
164- .. _installed and configured a MongoDB server : http://docs.mongodb.org/manual/installation/
165+ .. code-block :: sql
166+
167+ use session_db
168+ db.session.ensureIndex( { "expireAt": 1 }, { expireAfterSeconds: 0 } )
169+
170+ .. _installed and configured a MongoDB server : http://docs.mongodb.org/manual/installation/
171+ .. _MongoDB shell : http://docs.mongodb.org/v2.2/tutorial/getting-started-with-the-mongo-shell/
You can’t perform that action at this time.
0 commit comments