Просмотр исходного кода

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.
Bond_009 4 месяцев назад
Родитель
Сommit
1af7b6d348
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      Emby.Server.Implementations/Library/LibraryManager.cs

+ 1 - 0
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 _);