Class: AtomicCache::Storage::Store
- Inherits:
-
Object
- Object
- AtomicCache::Storage::Store
- Defined in:
- lib/atomic_cache/storage/store.rb
Instance Method Summary collapse
-
#add(key, new_value, ttl, user_options) ⇒ Object
abstract
ttl is in millis operation must be atomic returns true when the key doesn’t exist and was written successfully returns false in all other cases.
-
#delete(key, user_options) ⇒ Object
abstract
returns true if it succeeds; false otherwise.
-
#read(key, user_options) ⇒ Object
abstract
return the
valueatkey. -
#set(key, new_value, user_options) ⇒ Object
abstract
returns true if it succeeds; false otherwise.
Instance Method Details
#add(key, new_value, ttl, user_options) ⇒ Object
This method is abstract.
(String, Object, Integer, Hash) -> Boolean
ttl is in millis operation must be atomic returns true when the key doesn’t exist and was written successfully returns false in all other cases
15 |
# File 'lib/atomic_cache/storage/store.rb', line 15 def add(key, new_value, ttl, ); raise NotImplementedError end |
#delete(key, user_options) ⇒ Object
This method is abstract.
(String) -> Boolean
returns true if it succeeds; false otherwise
27 |
# File 'lib/atomic_cache/storage/store.rb', line 27 def delete(key, ); raise NotImplementedError end |
#read(key, user_options) ⇒ Object
This method is abstract.
(String, Hash) -> String
return the value at key
19 |
# File 'lib/atomic_cache/storage/store.rb', line 19 def read(key, ); raise NotImplementedError end |
#set(key, new_value, user_options) ⇒ Object
This method is abstract.
(String, Object) -> Boolean
returns true if it succeeds; false otherwise
23 |
# File 'lib/atomic_cache/storage/store.rb', line 23 def set(key, new_value, ); raise NotImplementedError end |