Session cleanup

Hello. I’m not able to find information on how sessions are cleaned up. Out of the box, when session is created, it has expiration date. But after the expiration date passes, Parse doesn’t seem to remove/cleanup.

Do I need to remove expired sessions manually or is there a Parse configuration for that?

Thank you.

If you examine your mongo, you should find an index on the _Session collection that does auto remove expired entries… outlined below. Note that I have removed my other indexes to clean up the output… The mongo expireAfterSeconds should be the one you are looking for…

rs0:PRIMARY> var s = db.getCollection('_Session')
rs0:PRIMARY> s.getIndexes();
		"v" : 1,
		"key" : {
			"expiresAt" : 1
		"name" : "expiresAt_1",
		"sparse" : true,
		"expireAfterSeconds" : 1

Hm, I only have index on _id field.
Does Parse platform creates/maintains those indexes?