Class: CacheStoreContract
- Inherits:
-
Object
- Object
- CacheStoreContract
- Defined in:
- lib/cache_store.rb
Overview
Defines the contract that CacheStore implementations must adhere to.
Instance Method Summary collapse
-
#exist?(key) ⇒ Boolean
Checks if a value exists within this cache store for a specific key.
-
#get(key, expires_in = 0, &block) ⇒ Object
Gets a value from this cache store by its unique key.
-
#initialize(namespace = '') ⇒ CacheStoreContract
constructor
A new instance of CacheStoreContract.
-
#remove(key) ⇒ Object
Removes a value from this cache store by its unique key.
-
#set(key, value, expires_in = 0) ⇒ Object
Sets a value within this cache store by its key.
Constructor Details
#initialize(namespace = '') ⇒ CacheStoreContract
Returns a new instance of CacheStoreContract.
9 10 |
# File 'lib/cache_store.rb', line 9 def initialize(namespace = '') end |
Instance Method Details
#exist?(key) ⇒ Boolean
Checks if a value exists within this cache store for a specific key.
37 38 |
# File 'lib/cache_store.rb', line 37 def exist?(key) end |
#get(key, expires_in = 0, &block) ⇒ Object
Gets a value from this cache store by its unique key.
25 26 |
# File 'lib/cache_store.rb', line 25 def get(key, expires_in = 0, &block) end |
#remove(key) ⇒ Object
Removes a value from this cache store by its unique key.
31 32 |
# File 'lib/cache_store.rb', line 31 def remove(key) end |
#set(key, value, expires_in = 0) ⇒ Object
Sets a value within this cache store by its key.
17 18 |
# File 'lib/cache_store.rb', line 17 def set(key, value, expires_in = 0) end |