memcached-binary

1.0.1 • Public • Published

memcached-binary

Binary Memcached client for Node.js

Compared to other Node.js memcache clients, this uses the Memcache binary API exclusively, which means you are able to store and retrieve any data, including those which are raw binary or contain newlines, which cause problems with other implementations.

Usage:

var MemcachedBinary = require('memcached-binary');

var server = 'localhost:11211'; // '/somesocketpath' or 'somehost:someport'
var params = { // Various params and options
  use_buffers: false, // If true, always return Buffers instead of strings; defaults to false
};
var memcached_binary = new MemcachedBinary(server, params);

memcached_binary.set('key', 'value');
memcached_binary.get('key', null, function(err, res) {
  console.log(err || res); // Will log 'value'
});

Auto-generated API docs

Code licensed under the New BSD license. See LICENSE file for terms.

Readme

Keywords

Package Sidebar

Install

npm i memcached-binary

Weekly Downloads

1

Version

1.0.1

License

BSD-3-Clause

Last publish

Collaborators

  • jimbly