Class: Suo::Client::Redis
Constant Summary collapse
- OK_STR =
"OK".freeze
Constants inherited from Base
Base::BLANK_STR, Base::DEFAULT_OPTIONS
Instance Attribute Summary
Attributes inherited from Base
#client, #key, #options, #resources
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(key, options = {}) ⇒ Redis
constructor
A new instance of Redis.
Methods inherited from Base
#lock, #locked?, #locks, #refresh, #unlock
Constructor Details
#initialize(key, options = {}) ⇒ Redis
Returns a new instance of Redis.
6 7 8 9 |
# File 'lib/suo/client/redis.rb', line 6 def initialize(key, = {}) [:client] ||= ::Redis.new([:connection] || {}) super end |
Instance Method Details
#clear ⇒ Object
11 12 13 |
# File 'lib/suo/client/redis.rb', line 11 def clear @client.del(@key) end |