From 1af7b6d348d9d81a9c62e3f69458f89d0e2c09ba Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 21 Feb 2025 17:24:19 +0100 Subject: [PATCH] Delete children from cache on parent delete This seems like a simple and safe (small) win. Automatically invalidating cache entries after a while would be even better (or not having a cache at all) but such changes are too big for a point release IMO. --- Emby.Server.Implementations/Library/LibraryManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 28f7ed6598..d9caa64636 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -454,6 +454,7 @@ namespace Emby.Server.Implementations.Library foreach (var child in children) { _itemRepository.DeleteItem(child.Id); + _cache.TryRemove(child.Id, out _); } _cache.TryRemove(item.Id, out _);