diff --git a/DysonNetwork.Sphere/Post/PostService.cs b/DysonNetwork.Sphere/Post/PostService.cs index 7bb25f3..b0e4c1e 100644 --- a/DysonNetwork.Sphere/Post/PostService.cs +++ b/DysonNetwork.Sphere/Post/PostService.cs @@ -758,15 +758,9 @@ public partial class PostService( .Take(3) .ToDictionaryAsync(e => e.PostId, e => e.Count); - var featuredPostsId = reactSocialPoints.Select(e => e.Key).ToList(); + featuredIds = reactSocialPoints.Select(e => e.Key).ToList(); - await cache.SetAsync(FeaturedPostCacheKey, featuredPostsId, TimeSpan.FromMinutes(5)); - } - - if (featuredIds is null) - { - logger.LogWarning("Failed to load featured post IDs from cache and the database is empty..."); - return []; + await cache.SetAsync(FeaturedPostCacheKey, featuredIds, TimeSpan.FromMinutes(5)); } var posts = await db.Posts