Module: Cachable Private
- Extended by:
- T::Generic
- Included in:
- AbstractTab, DependencyCollector, Formula, Formulary, Homebrew::API, Homebrew::API::Cask, Homebrew::API::Formula, Homebrew::API::Internal, Keg, Readall, Requirement, Tap, Utils::Analytics
- Defined in:
- cachable.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Constant Summary collapse
- Cache =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
Sorbet type members are mutable by design and cannot be frozen.
type_member { { upper: T::Hash[T.anything, T.anything] } }
Instance Method Summary collapse
- #cache ⇒ Cache private
- #clear_cache ⇒ void private
Instance Method Details
#cache ⇒ Cache
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.
10 11 12 |
# File 'cachable.rb', line 10 def cache @cache ||= T.let(T.cast({}, Cache), T.nilable(Cache)) end |
#clear_cache ⇒ 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.
15 16 17 |
# File 'cachable.rb', line 15 def clear_cache cache.clear end |