Class: ActiveSupport::Cache::RedisHash
- Inherits:
-
Store
- Object
- Store
- ActiveSupport::Cache::RedisHash
- Defined in:
- lib/active_support/cache/redis_hash.rb
Instance Method Summary collapse
-
#clear(options = nil) ⇒ Object
Clear the entire cache on server.
-
#initialize(*options) ⇒ RedisHash
constructor
A new instance of RedisHash.
-
#read_multi(*names) ⇒ Object
Reads multiple values from the cache using a single call to the servers for all keys.
Constructor Details
Instance Method Details
#clear(options = nil) ⇒ Object
Clear the entire cache on server. This method should be used with care when shared cache is being used.
21 22 23 |
# File 'lib/active_support/cache/redis_hash.rb', line 21 def clear( = nil) @hash.destroy end |
#read_multi(*names) ⇒ Object
Reads multiple values from the cache using a single call to the servers for all keys.
15 16 17 |
# File 'lib/active_support/cache/redis_hash.rb', line 15 def read_multi(*names) @hash[*names] end |