Add ability to use mongodb as cache