Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

memcached-q

A wrapper for the npm "memcached" package which converts the asynchronous methods to a promise-based API, using npm "q" package's promise implementation.

Installation

npm install memcached-q --save

Usage

varMemcacheQ=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.});

API Reference:

See the memcached API docs for more details. The API is identical except where node-style async functions are concerned.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages