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.


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.