Skip to content

Shrine storage interface for storing files in Redis.

License

Notifications You must be signed in to change notification settings

dbongo/shrine-redis

Repository files navigation

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

About

Shrine storage interface for storing files in Redis.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages