This repository has been archived by the owner. It is now read-only.
Meta gem for sprockets cache implementations
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
sprockets-caches.gemspec

README.md

Sprockets Caches

Meta gem for different sprocket cache store implementations like Memcache, MongoDB, Redis and Riak.

Usage

Gemfile:

gem "sprockets"
gem "sprockets-caches"
# ...

config.ru:

require "sprockets"
# and one of the following:
require "sprockets/cache/memcache_store"
require "sprockets/cache/mongodb_store"
require "sprockets/cache/redis_store"
require "sprockets/cache/riak_store"

env = Sprockets::Environment.new
env.cache = Sprockets::Cache::RiakStore.new(riak, "sprockets") # example for Riak
# ...

First argument is the desired client/connection and the second (an optional) key prefix/bucket/database name.