A wrapper for the npm "memcached" package which converts the asynchronous methods to a promise-based API, using npm "q" package's promise implementation.
npm install memcached-q --savevarMemcacheQ=require('memcached-q');varcache=newMemcacheQ(serverLocations,options);cache.set('foo','bar',20).catch(e=>console.log('An error occurred: ',e));// Later on:cache.get('foo').then(val=>{if(val){returnval;}else{returnexpensiveFetchWithPromiseAPI();}}).then(val=>{// Do something with result.});See the memcached API docs for more details. The API is identical except where node-style async functions are concerned.