Browse Source

Use Find instead Get while looking for a page

pull/17642/head
Enis Necipoglu 3 years ago
parent
commit
cede3921f4
No known key found for this signature in database GPG Key ID: 1EC55E13241E1680
  1. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs

2
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs

@ -35,7 +35,7 @@ public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppSe
{ {
var pageCacheItem = await PageCache.GetOrAddAsync(new PageCacheKey(slug), async () => var pageCacheItem = await PageCache.GetOrAddAsync(new PageCacheKey(slug), async () =>
{ {
var page = await PageRepository.GetBySlugAsync(slug); var page = await PageRepository.FindBySlugAsync(slug);
if (page is null) if (page is null)
{ {
return null; return null;

Loading…
Cancel
Save