0.0
No commit activity in last 3 years
No release in over 3 years
Redis storage interface for Shrine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 5.0
>= 12.3.3

Runtime

~> 3.2
~> 2.0
 Project Readme

Shrine::Storage::Redis

Provides a Shrine Storage for storing files in Redis.

Installation

gem "shrine-redis"

Usage

# This example assumes a redis-server instance is running in the background

require "redis"
require "shrine"
require "shrine/storage/redis"

redis = Redis.new

cache = { client: redis, prefix: "cache", expire: 60 }
store = { client: redis, prefix: "store", expire: 3600 }

Shrine.storages = {
  cache: Shrine::Storage::Redis.new(cache),
  store: Shrine::Storage::Redis.new(store)
}

Contributing

You can run the tests with Rake:

$ bundle exec rake test

License

MIT