• Michael Kozono's avatar
    Extract `Repository.memoize_method` method · d9c4ebc5
    Michael Kozono authored
    And reuse `Gitlab::Utils::StrongMemoize`.
    
    There is a subtle behavior change required to reuse StrongMemoize in
    this case. The early fallback check now occurs *before* reading the
    memoized value instead of after.
    
    I think this is fine since a memoized value should only exist if
    `exists?` is also already memoized as `true`.
    d9c4ebc5
repository_cache_adapter_spec.rb 3.8 KB