lib/hari/configuration/redis.rb in hari-0.0.4 vs lib/hari/configuration/redis.rb in hari-0.0.5
- old
+ new
@@ -14,12 +14,16 @@
end
private
def redis_namespace(server)
- return server if server.kind_of?(::Redis::Namespace)
+ prefix = 'hari'
- ::Redis::Namespace.new :hari, redis_server(server)
+ if server.kind_of?(::Redis::Namespace)
+ prefix = "#{server.namespace}:#{prefix}"
+ end
+
+ ::Redis::Namespace.new prefix, redis_server(server)
end
def redis_server(server)
return server unless server.kind_of?(::String)