Class: Smooth::Backends::RedisNamespace
- Defined in:
- lib/smooth/backends/redis_namespace.rb
Instance Attribute Summary
Attributes inherited from Redis
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RedisNamespace
constructor
A new instance of RedisNamespace.
Methods inherited from Redis
#create, #destroy, #index, #show, #update
Methods inherited from Base
#create, #destroy, #index, #maximum_updated_at, #query, #records, #show, #update
Constructor Details
#initialize(options = {}) ⇒ RedisNamespace
Returns a new instance of RedisNamespace.
4 5 6 7 |
# File 'lib/smooth/backends/redis_namespace.rb', line 4 def initialize ={} @namespace, @priority = .values_at(:namespace, :priority) @connection = ::Redis::Namespace.new( @namespace, redis: ::Redis.new(.fetch(:redis_options, {}))) end |