Hikki::Adapters::RedisAdapter

A Redis adapter for Hikki. It uses the redis gem to communicate with Redis.

Installation

Add this line to your application's Gemfile:

gem 'hikki-redis'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hikki-redis

Usage

By default, the adapter will use Redis.new as it's connection which uses the defaults in that gem. You can pass in your own connection to use instead, useful for specifying a server and other options.

# Use the default connection
require 'redis_adapter'

adapter = Hikki::Adapters::RedisAdapter.new

# Use a specific connection
redis = Redis.new(:url => "redis://:[email protected]:6380/15")
adapter = Hikki::Adapters::RedisAdapter.new(redis)

If you do not specify an id when saving, the adapter will generate a uuid using SecureRandom.

Contributing

  1. Fork it ( http://github.com/originate/hikki/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Write your specifications
  4. Implement your specifications
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request