Redis::Objects::RMap

Installation

Add this line to your application's Gemfile:

gem'redis-objects-rmap'

And then execute:

$ bundle

Or install it yourself as:

$ gem install redis-objects-rmap

Usage

classFoo<ActiveRecord::BaseincludeRedis::Objects::RMaphas_rmap:title# field to use as a title
endFoo.create!:title=>'foo'Foo.rmap# {1 => 'foo'} <- Does SQL request and puts to Redis
Foo.rmap# {1 => 'foo'} <- Gets from Redis without an SQL query