diff --git a/src/LinkDotNet.Blog.Web/Features/Home/Index.razor b/src/LinkDotNet.Blog.Web/Features/Home/Index.razor index 8bced514..eb816530 100644 --- a/src/LinkDotNet.Blog.Web/Features/Home/Index.razor +++ b/src/LinkDotNet.Blog.Web/Features/Home/Index.razor @@ -54,15 +54,15 @@ // The hot path is that users land on the initial page which is the first page. // So we want to cache that page for a while to reduce the load on the database // and to speed up the page load. - // That will lead to stale blog posts for 5 minutes for the first page, - // but I am fine with that (as publishing isn't super critical). + // That will lead to stale blog posts for 5 minutes (worst case) for the first page, + // but I am fine with that (as publishing isn't super critical and not done multiple times per hour). // It might be tackled in the future (for example invalidate option via Admin UI). if (Page == 1) { currentPage = await MemoryCache.GetOrCreateAsync(firstPageCacheKey, async entry => { entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5); - return await GetAllForPageAsync(Page.Value); + return await GetAllForPageAsync(1); }); return; }