-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: 1.4
-
Component/s: None
-
Empty show more show less
In some cases we would like to add a time to live on files on GridFS.
It can be achieved with index TTL.
As discussed at FOSDEM 2014 with christkv, since GridFS stores its data in two collections, and since the TTL cleanup is not strictly executed right when the document expires; we probably should delay the deletion of the chunks to try to avoid having GridFS files without their chunks. The TTL cleanup delay has no upper bound though, so we should still expect some rare cases where it happens.
However, I'm not sure how to expose this in the driver: it just works with custom fields in 'data', and custom index TTL on them. Maybe just add an example and a warning about the delay to add between the collections.