Simple mongo db key-value store implementation
Usage
var MongoDBCache = ;var mdbCache = uri: 'mongodb://127.0.0.1:27017/data-cache-db' //default collection: 'mdb-cache' //default connectionOptions: {} idFeild: '_id' //default, stands for feild name of 'key' in mongodb; //return a promise resolve the value, //can pass in a function as second parameter that check the vadality of the value,//and if function return true, value will be deleted, and get promise will resolve null;mdbCache; //return a promise that indicates successfully 'set' if fulfilledmdbCache; //return a promise that indicates successfully 'delete a key-value' if fulfilledmdbCache; //close connection;mdbCache; // register an error handlermdbCache;