koa-mongodb-session icon indicating copy to clipboard operation
koa-mongodb-session copied to clipboard

ttl for documents

Open kof opened this issue 11 years ago • 3 comments

At some point we need to remove expired docs, did I miss this feature out?

kof avatar Jun 11 '14 13:06 kof

nope didn't miss it. still need to add the TTL index and an extra date field. just haven't gotten to it yet.

aheckmann avatar Jun 11 '14 19:06 aheckmann

do you think its better to use mongos ttl than just remove periodically manually? there are lots of considerations haha http://docs.mongodb.org/manual/tutorial/expire-data/

kof avatar Jun 11 '14 19:06 kof

yes. manually we'll run into a lot of the same considerations but also have to write the code ourselves. we'd also need to somehow account for more than one app server running and tracking reapers across them all (yuck).

aheckmann avatar Jun 11 '14 19:06 aheckmann