GitXplorerGitXplorer
y

memjs-wrapper

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
d3f2cfc8b49eeb8f981096419be32c1e84ada9c4

initial commit — modularizing from another project

yyurivictor committed 8 years ago

README

The README file for this repository.

memjs wrapper

A simple set/get wrapper for using json with memjs.

Quick start

Add it to your project:

$ npm install --save https://github.com/yurivictor/memjs-wrapper.git

Get and set some stuff:

// Require the library
var Cache = require( 'memjs-wrapper' );

// Initiate the client
var cache = new Cache();

// Set a json object
cache.set( 'hello', { who_am_i: "you" }, show_results );

// Get a json object
cache.get( 'hello', show_results );

// Show results
function show_results ( val ) {
  console.log( val );
}

Example

To view the example, clone the repo and install the dependencies:

$ git clone git://github.com/yurivictor/memjs-wrapper.git
$ cd memjs-wrapper
$ npm install

Then run the example:

$ node example.js

Using memcache

On Heroku

Add to existing heroku dyno:

heroku addons:create memcachier:dev

Locally

Make sure you have memcached installed.

MacOS: brew install memcached

Then run memcache:

memcached -v

People

The original author is @yurivictor.

License

BSD


back to top