brew/Library/Homebrew/cachable.rb

15 lines
257 B
Ruby
Raw Permalink Normal View History

2023-08-08 13:54:59 -07:00
# typed: strict
# frozen_string_literal: true
module Cachable
2023-08-08 13:54:59 -07:00
sig { returns(T::Hash[T.untyped, T.untyped]) }
def cache
2023-08-08 13:54:59 -07:00
@cache ||= T.let({}, T.nilable(T::Hash[T.untyped, T.untyped]))
end
2023-08-08 13:54:59 -07:00
sig { void }
def clear_cache
cache.clear
end
end