The Free Software Media System - Server Backend & API
Fix MemoryCache Usage.
Patrick Barronbea519de5b78
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.csindex 8d6292867b..d8ab1f1a14 100644--- a/Emby.Server.Implementations/Channels/ChannelManager.cs+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs@@ -426,7 +426,7 @@ namespace Emby.Server.Implementations.Channelsvar mediaInfo = await channel.GetChannelItemMediaInfo(id, cancellationToken).ConfigureAwait(false);var list = mediaInfo.ToList();- _memoryCache.CreateEntry(id).SetValue(list).SetAbsoluteExpiration(DateTimeOffset.UtcNow.AddMinutes(5));+ _memoryCache.Set(id, list, DateTimeOffset.UtcNow.AddMinutes(5));return list;}diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.csindex 2921a7f0e0..cc4b407f5c 100644--- a/Emby.Server.Implementations/Devices/DeviceManager.cs+++ b/Emby.Server.Implementations/Devices/DeviceManager.cs@@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Deviceslock (_capabilitiesSyncLock){- _memoryCache.CreateEntry(deviceId).SetValue(capabilities);+ _memoryCache.Set(deviceId, capabilities);_json.SerializeToFile(capabilities, path);}}