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 @@ List<ScoreInfo> getBeatmapScores(BeatmapSetInfo set)
dependencies.Cache(DifficultyCache = new BeatmapDifficultyCache());
AddInternal(DifficultyCache);
var scorePerformanceManager = new ScorePerformanceManager();
var scorePerformanceManager = new ScorePerformanceCache();
dependencies.Cache(scorePerformanceManager);
AddInternal(scorePerformanceManager);

View File

@ -13,9 +13,10 @@
namespace osu.Game.Scoring
{
/// <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>
public class ScorePerformanceManager : Component
public class ScorePerformanceCache : Component
{
// this cache will grow indefinitely per session and should be considered temporary.
// this whole component should likely be replaced with database persistence.

View File

@ -28,7 +28,7 @@ public PerformanceStatistic(ScoreInfo score)
}
[BackgroundDependencyLoader]
private void load(ScorePerformanceManager performanceManager)
private void load(ScorePerformanceCache performanceCache)
{
if (score.PP.HasValue)
{
@ -36,7 +36,7 @@ private void load(ScorePerformanceManager performanceManager)
}
else
{
performanceManager.CalculatePerformanceAsync(score, cancellationTokenSource.Token)
performanceCache.CalculatePerformanceAsync(score, cancellationTokenSource.Token)
.ContinueWith(t => Schedule(() => setPerformanceValue(t.Result)), cancellationTokenSource.Token);
}
}