small library to use redis as JSON datastore for objects (serialized in json via Oj)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
extra
Gemfile
Gemfile.lock
Readme.md
redijson.rb

Readme.md

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!