Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 498 Bytes

Readme.md

File metadata and controls

35 lines (21 loc) · 498 Bytes

RediJson

small library to use redis + arbitrary objects (serialized in json)

API / Usage

strings

R[:foo] # nil
R[:foo] = "bar"
R[:foo] # bar

and more!

R[:foo] = ["f", "o", "o"]

R[:foo] # ["f", "o", "o"]

As you can see, it serializes and deserializes JSON arrays, and...

R[:foo] = { foo: "bar" }

R[:foo] # { foo: "bar" }

...objects

and the implementation is really few lines of code, because it's composing two simple things, redis and json together!