• 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.rb 27.3 KB