Fix MemoryCache Usage.

This commit is contained in:
Patrick Barron 2020-08-07 13:22:18 -04:00
parent c82b26a4b1
commit bea519de5b
2 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ namespace Emby.Server.Implementations.Channels
var 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;
}

View File

@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Devices
lock (_capabilitiesSyncLock)
{
_memoryCache.CreateEntry(deviceId).SetValue(capabilities);
_memoryCache.Set(deviceId, capabilities);
_json.SerializeToFile(capabilities, path);
}
}