0.0.8 • Published 10 years ago

toshihiko-redis v0.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Toshihiko-Redis

Build Status Coverage Status Dependency Status

The redis support for Toshihiko as an addon.

Installation

$ npm install toshihiko-redis

How to Use

When you define a Toshihiko, you could pass the object into cache option:

var T = require("toshihiko");
var toshihiko = new T.Toshihiko("database", "username", "", {
    cache: {
        name: "redis",
        servers: "localhost:6379",
        options: { prefix: "_" }
    }
});

name must be redis and then Toshihiko will search for the package toshihiko-redis.

servers may be a string for the server addresses.

Otherwise, you may create this object by yourself and pass the created object into cached:

var Redis = require("toshihiko-redis");
var object = Redis.create(SERVRES, OPTIONS);
var toshihiko = new T.Toshihiko(DATABASE, USERNAME, PASSWORD, {
    cache: object
});

or

var Redis = require("toshihiko-redis");
var object = new Redis(SERVRES, OPTIONS);
var toshihiko = new T.Toshihiko(DATABASE, USERNAME, PASSWORD, {
    cache: object
});

DEBUG

use dubug lib

DEBUG=toshihiko-redis
0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago