sync-memcached-store
Synchronous Fibers-powered Memcached store for sync-cache. The store use syncho to retrieve data "synchronously" from memcached so the code needs to run in a Fiber.
Usage
npm install sync-memcached-store --save
var Sync = SyncCache = MC = mc = uri: 'localhost:11211' maxAge: 1000*60*60 ns: 'mynamespace' cache = store: mc load: mySyncFunction ; ; { return 'some value';}
Parameters
uri
- memcached endpoint string, can be passed as auri
property of the options object insteadoptions
- an options object
Options
uri
- memcached endpointns
- optional namespacemaxAge
- maximum number of milliseconds to keep items, defaults 60000timeout
- operation timeout, defaults 1000
Testing
Unit tests: npm test
Integration tests (require local memcached server running on default port): npm run integration