mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Merge pull request #3840 from barronpm/fix-memorycache
Fix MemoryCache Usage.
This commit is contained in:
commit
7e49358ba9
@ -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;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Devices
|
||||
|
||||
lock (_capabilitiesSyncLock)
|
||||
{
|
||||
_memoryCache.CreateEntry(deviceId).SetValue(capabilities);
|
||||
_memoryCache.Set(deviceId, capabilities);
|
||||
_json.SerializeToFile(capabilities, path);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user