diff --git a/allstarr/Controllers/AdminController.cs b/allstarr/Controllers/AdminController.cs index d36d0bd..a4ad081 100644 --- a/allstarr/Controllers/AdminController.cs +++ b/allstarr/Controllers/AdminController.cs @@ -252,9 +252,18 @@ public class AdminController : ControllerBase // Try to use the pre-built playlist cache first (includes manual mappings!) var playlistItemsCacheKey = $"spotify:playlist:items:{config.Name}"; - var cachedPlaylistItems = await _cache.GetAsync>>(playlistItemsCacheKey); - _logger.LogDebug("Checking cache for {Playlist}: {CacheKey}, Found: {Found}, Count: {Count}", + List>? cachedPlaylistItems = null; + try + { + cachedPlaylistItems = await _cache.GetAsync>>(playlistItemsCacheKey); + } + catch (Exception cacheEx) + { + _logger.LogWarning(cacheEx, "Failed to deserialize playlist cache for {Playlist}", config.Name); + } + + _logger.LogInformation("Checking cache for {Playlist}: {CacheKey}, Found: {Found}, Count: {Count}", config.Name, playlistItemsCacheKey, cachedPlaylistItems != null, cachedPlaylistItems?.Count ?? 0); if (cachedPlaylistItems != null && cachedPlaylistItems.Count > 0)