Browse Source
Use Find instead Get while looking for a page
pull/17642/head
Enis Necipoglu
3 years ago
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680
1 changed files with
1 additions and
1 deletions
-
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; |
|
|
|