Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.
/ multi_store Public archive

MultiStore allows you to delegate to multiple ActiveSupport cache stores.

License

Notifications You must be signed in to change notification settings

Gusto/multi_store

Repository files navigation

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.

About

MultiStore allows you to delegate to multiple ActiveSupport cache stores.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages