hapijs/catbox-mongodb — pull request #9 by jardakotesovec (2014-09-11 05:26:57+00:00)
Title: Using _id field for item key

In current implementation, *key* field is used to store key. There is no index created though.

I suggest to not create index for the *key* field, but use *_id* instead. *_id* can by any type other than array ([MongoDoc](http://docs.mongodb.org/manual/core/document/#the-id-field)) and is automatically indexed with unique index which is exactly what we need here.

Result is significantly better performance and it also saves some storage.