Redis Storage for Shrine
Ruby
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/shrine/storage
test
.gitignore
CODE_OF_CONDUCT.md
Gemfile
LICENSE.txt
README.md
Rakefile
shrine-redis.gemspec

README.md

Shrine::Storage::Redis

Provides a Shrine Storage for storing files in Redis.

Installation

gem "shrine-redis"

Usage

require "shrine/storage/redis"

redis = Redis.new(url: "redis://host:port/db")

Shrine.storages = {
  cache: Shrine::Storage::Redis.new(
    client: redis,
    prefix: "cache",
    expire: 60
  ),
  store: Shrine::Storage::Redis.new(
    client: redis,
    prefix: "store",
    expire: 3600
  )
}

Contributing

You can run the tests with Rake:

$ bundle exec rake test

License

MIT