1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 06:32:55 +08:00

Rename ScorePerformanceManager to ScorePerformanceCache

This commit is contained in:
Dean Herbert 2020-11-06 13:15:33 +09:00
parent 5113d4af8f
commit 14bb079feb
3 changed files with 6 additions and 5 deletions

View File

@ -229,7 +229,7 @@ namespace osu.Game
dependencies.Cache(DifficultyCache = new BeatmapDifficultyCache()); dependencies.Cache(DifficultyCache = new BeatmapDifficultyCache());
AddInternal(DifficultyCache); AddInternal(DifficultyCache);
var scorePerformanceManager = new ScorePerformanceManager(); var scorePerformanceManager = new ScorePerformanceCache();
dependencies.Cache(scorePerformanceManager); dependencies.Cache(scorePerformanceManager);
AddInternal(scorePerformanceManager); AddInternal(scorePerformanceManager);

View File

@ -13,9 +13,10 @@ using osu.Game.Beatmaps;
namespace osu.Game.Scoring namespace osu.Game.Scoring
{ {
/// <summary> /// <summary>
/// A global component which calculates and caches results of performance calculations for locally databased scores. /// A component which performs and acts as a central cache for performance calculations of locally databased scores.
/// Currently not persisted between game sessions.
/// </summary> /// </summary>
public class ScorePerformanceManager : Component public class ScorePerformanceCache : Component
{ {
// this cache will grow indefinitely per session and should be considered temporary. // this cache will grow indefinitely per session and should be considered temporary.
// this whole component should likely be replaced with database persistence. // this whole component should likely be replaced with database persistence.

View File

@ -28,7 +28,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(ScorePerformanceManager performanceManager) private void load(ScorePerformanceCache performanceCache)
{ {
if (score.PP.HasValue) if (score.PP.HasValue)
{ {
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
} }
else else
{ {
performanceManager.CalculatePerformanceAsync(score, cancellationTokenSource.Token) performanceCache.CalculatePerformanceAsync(score, cancellationTokenSource.Token)
.ContinueWith(t => Schedule(() => setPerformanceValue(t.Result)), cancellationTokenSource.Token); .ContinueWith(t => Schedule(() => setPerformanceValue(t.Result)), cancellationTokenSource.Token);
} }
} }