Class: CacheStore Private

Inherits:
Object show all
Defined in:
cache_store.rb

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

DescriptionCacheStore, LinkageCacheStore

Instance Method Summary collapse

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.

Parameters:



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 is abstract.

This method returns an undefined value.

Deletes data from the cache based on a condition defined in a concrete class.

Parameters:

  • args (T.anything)

Raises:

  • (NotImplementedError)


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.

This method is abstract.

Fetches cached values in persistent storage according to the type of data stored.

Parameters:

  • args (T.anything)

Returns:

  • (T.untyped)

Raises:

  • (NotImplementedError)


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 is abstract.

This method returns an undefined value.

Inserts new values or updates existing cached values to persistent storage.

Parameters:

  • args (T.anything)

Raises:

  • (NotImplementedError)


204
205
206
# File 'cache_store.rb', line 204

def update!(*args)
  raise NotImplementedError
end