mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
15 lines
257 B
Ruby
15 lines
257 B
Ruby
# typed: strict
|
|
# frozen_string_literal: true
|
|
|
|
module Cachable
|
|
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
|
def cache
|
|
@cache ||= T.let({}, T.nilable(T::Hash[T.untyped, T.untyped]))
|
|
end
|
|
|
|
sig { void }
|
|
def clear_cache
|
|
cache.clear
|
|
end
|
|
end
|