Caching connection to MongoDB