0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
An ActiveSupport::Store that delegates to a series of stores in order.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

< 5, >= 3
 Project Readme

WARNING

This repo is no longer actively maintained. Use at your own discretion

CircleCI

MultiStore

MultiStore allows you to delegate to multiple ActiveSupport cache stores. This makes it easy to implement behaviors such as "cache frequently used things locally, but infrequently used things remotely".

Usage

Add an initializer that sets the rails cache, and tier your caches to your heart's content!

stores = [
  ActiveSupport::Cache::MemoryStore.new,
  ActiveSupport::Cache::FileStore.new('/tmp/cache')
]
ActionController::Base.cache_store = :multi_store, stores
Rails.cache = ActionController::Base.cache_store

Installation

Add this line to your application's Gemfile:

gem 'multi_store'

And then execute:

$ bundle

Or install it yourself as:

$ gem install multi_store

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Gusto/multi_store.