memcache icon indicating copy to clipboard operation
memcache copied to clipboard

Node.js memcached client with the most efficient ASCII protocol parser

Build Status

memcache

NodeJS memcached client with the most efficient ASCII protocol parser.

Features

  • Very efficient memcached ASCII protocol parser by using only NodeJS Buffer APIs.
  • Optional compression for the data before sending to memcached
  • Auto reconnects when there's network error or timeout
  • Support sending arbitrary commands. Read up on the protocol doc here.
  • Support storing string, numeric, and JSON values
  • APIs Support callback or Promise
  • Support fire and forget requests
  • Support multiple connections
  • Support TLS connections

Packages

This repo uses lerna to manage multiple packages.

  • memcache-client - client NPM version The primary package which is the memcached client.
  • memcache-parser - parser NPM version A very efficient memcached ASCII protocol parser.
  • memcached-njs - server NPM version A working memcached server implemented in NodeJS for tests.

Development environment installation

  1. Clone this repo
  2. run nvm use
  3. run npm ci
  4. run npm run bootstrap
  5. optional: just to make sure everything is fine run npm run build and check if there's no error using that command
  6. Testing: run npm test

Publishing notes

  • Recommended publish flow is to publish the modules individually using npm publish, can be improved to use lerna in the future

Other Implementations

License

Apache-2.0 © Joel Chen