Low commit activity in last 3 years
No release in over a year
Extension to redis-activesupport for working with redis cluster
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 10.0
~> 3.0

Runtime

>= 6.0, < 7.1
 Project Readme

Redis cluster stores for ActiveSupport Build Status

This gem was an extension to redis-activesupport that adds support for a few features required to use redis-store with redis cluster. Right now there isn't an official redis cluster client in ruby, so it's become common to use a redis cluster proxy like corvus or Envoy. When switching there are a few things you can't do with redis cluster that you can do with a single redis server. Most of them revolve around issuing commands with multiple keys. In redis cluster, your keys are partitioned and live on different physical servers, operations like KEYS are not possible.

This is now leveraging Rails 6's built-in redis cache store with troubled commands removed.

Usage

This gem is a small extension to redis-activesupport, so refer to their documentation for most configuration. Instead of specifying :redis_store you must now specify :redis_cluster_store to load this extension.

module MyProject
  class Application < Rails::Application
    config.cache_store = :redis_cluster_store, options
  end
end

Installation

Add this line to your application's Gemfile:

gem "redis-cluster-activesupport"

And then execute:

$ bundle

Or install it yourself as:

$ gem install redis-cluster-activesupport

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/film42/redis-cluster-activesupport.

License

The gem is available as open source under the terms of the MIT License.