Class: CacheStore Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
CacheStore provides methods to mutate and fetch data from a persistent storage mechanism.
Direct Known Subclasses
Instance Method Summary collapse
-
#delete!(*args) ⇒ void
abstract
private
Deletes data from the cache based on a condition defined in a concrete class.
-
#fetch(*args) ⇒ T.untyped
abstract
private
Fetches cached values in persistent storage according to the type of data stored.
- #initialize(database) ⇒ void constructor private
-
#update!(*args) ⇒ void
abstract
private
Inserts new values or updates existing cached values to persistent storage.
Constructor Details
#initialize(database) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
196 197 198 |
# File 'cache_store.rb', line 196 def initialize(database) @database = T.let(database, CacheStoreDatabase) end |
Instance Method Details
#delete!(*args) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
Deletes data from the cache based on a condition defined in a concrete class.
221 222 223 |
# File 'cache_store.rb', line 221 def delete!(*args) raise NotImplementedError end |
#fetch(*args) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Fetches cached values in persistent storage according to the type of data stored.
213 214 215 |
# File 'cache_store.rb', line 213 def fetch(*args) raise NotImplementedError end |
#update!(*args) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
Inserts new values or updates existing cached values to persistent storage.
204 205 206 |
# File 'cache_store.rb', line 204 def update!(*args) raise NotImplementedError end |