From 41a2e6eeeba92bfd9e0b1d8e896f6c283d3d6e1c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 9 Sep 2021 14:56:39 +0900 Subject: [PATCH] Fix cache not actually caching anything --- osu.Game/Configuration/SettingSourceAttribute.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Configuration/SettingSourceAttribute.cs b/osu.Game/Configuration/SettingSourceAttribute.cs index 4346a583ec..5db502804d 100644 --- a/osu.Game/Configuration/SettingSourceAttribute.cs +++ b/osu.Game/Configuration/SettingSourceAttribute.cs @@ -168,14 +168,14 @@ namespace osu.Game.Configuration } } - private static readonly ConcurrentDictionary> property_info_cache = new ConcurrentDictionary>(); + private static readonly ConcurrentDictionary property_info_cache = new ConcurrentDictionary(); public static IEnumerable<(SettingSourceAttribute, PropertyInfo)> GetSettingsSourceProperties(this object obj) { var type = obj.GetType(); if (!property_info_cache.TryGetValue(type, out var properties)) - property_info_cache[type] = properties = getSettingsSourceProperties(type); + property_info_cache[type] = properties = getSettingsSourceProperties(type).ToArray(); return properties; }