0.2.5 • Published 11 years ago

simple_redis_client v0.2.5

Weekly downloads
32
License
-
Repository
github
Last release
11 years ago

#Simple Redis Client

It's a pretty simple and basic redis client, designed to be very fast and keep all code simple.

How to use?

var redisClient = require("simple_redis")
var myClient = redisClient.createClient(6379,"127.0.0.1") 
myClient.on("ready",function(){
    myClient.execute("set","hello","world",function(err){
        myClient.execute("get","hello",function(err,data){
            console.log(data.toString())
        })
    })
})

Why to Use?

  • It's extremly fast using buffers compared to other node.js redis clients
  • It has an standar interface that could support any new command without code modifications (ever than the protocol continue being the same)
  • Only 192 lines of code for the client
  • Based on the native c++ hiredis parser (https://github.com/pietern/hiredis-node)

Advance Options

'createClient' support 3 arguments 'host','port' and 'options', options is optional, if you want to use it, It could have next options

var options={
    return_buffers: Boolean (decide if the return value will be string or buffer, default: true),
    recheck_time: Number (If a disconnect occurs, It's the time in miliseconds between recoinnect tries, default: 1000),
    connectTimeout:  Number (It's the time before emit an error while the connection is creating, default: undefined),
}
0.2.5

11 years ago

0.2.4

11 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago