Class: CacheStore
Overview
CacheStore provides methods to mutate and fetch data from a persistent storage mechanism.
Direct Known Subclasses
Instance Method Summary collapse
-
#delete! ⇒ Object
abstract
Deletes data from the cache based on a condition defined in a concrete class.
-
#fetch ⇒ Object
abstract
Fetches cached values in persistent storage according to the type of data stored.
-
#initialize(database) ⇒ nil
constructor
-
#update! ⇒ Object
abstract
Inserts new values or updates existing cached values to persistent storage.
Constructor Details
#initialize(database) ⇒ nil
160 161 162 |
# File 'cache_store.rb', line 160 def initialize(database) @database = database end |
Instance Method Details
#delete! ⇒ Object
This method is abstract.
Deletes data from the cache based on a condition defined in a concrete class.
182 183 184 |
# File 'cache_store.rb', line 182 def delete!(*) raise NotImplementedError end |
#fetch ⇒ Object
This method is abstract.
Fetches cached values in persistent storage according to the type of data stored.
175 176 177 |
# File 'cache_store.rb', line 175 def fetch(*) raise NotImplementedError end |
#update! ⇒ Object
This method is abstract.
Inserts new values or updates existing cached values to persistent storage.
167 168 169 |
# File 'cache_store.rb', line 167 def update!(*) raise NotImplementedError end |