Starting with 2.1 (2.2 for stable), MongoDB allows collections to have a Time To Live to be set with ensureIndex() to be automatically expired.

This could allow actual server based cleaning without any PHP code.

http://docs.mongodb.org/manual/tutorial/expire-data/

Comments

fgm’s picture

Come to think of it, some might even be interested in them for the watchdog: they are an alternative to capped collections in some scenarii.