Update BeatmapDifficultyCache to use base implementation logic

This commit is contained in:
Dean Herbert
2020-11-06 14:31:21 +09:00
parent a2606d31c7
commit b69ada64e8
3 changed files with 63 additions and 81 deletions

View File

@ -20,7 +20,7 @@ namespace osu.Game.Database
protected virtual bool CacheNullValues => true;
/// <summary>
/// Retrieve the cached value for the given <see cref="TLookup"/>.
/// Retrieve the cached value for the given lookup.
/// </summary>
/// <param name="lookup">The lookup to retrieve.</param>
/// <param name="token">An optional <see cref="CancellationToken"/> to cancel the operation.</param>
@ -37,6 +37,9 @@ namespace osu.Game.Database
return computed;
}
protected bool CheckExists([NotNull] TLookup lookup, out TValue value) =>
cache.TryGetValue(lookup, out value);
/// <summary>
/// Called on cache miss to compute the value for the specified lookup.
/// </summary>