hapijs/catbox-mongodb — pull request #7 by jardakotesovec (2014-09-10 16:12:37+00:00)
Title: Adding MongoDB TTL index

I have same suggestion as https://github.com/hapijs/catbox-mongodb/pull/5

ensureIndex is called only once per process life-time.

As described here http://docs.mongodb.org/manual/tutorial/expire-data/ , every document requires expire date (I created expireAt field), so individual items can have individual times.

Its my first day with Hapi, so hope its ok. I will need some assistance with code coverage though. It make sense to test err incase it drops connection or something, but not sure how to write test for it.