Better cache for DoesSlugExistAsync

pull/17642/head
Enis Necipoglu 2 years ago
parent 820d8e55f1
commit f7a910187e
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680

@ -74,12 +74,8 @@ public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppSe
public virtual async Task<bool> DoesSlugExistAsync([NotNull] string slug)
{
var cached = await PageCache.GetAsync(new PageCacheKey(slug));
if (cached is not null)
{
return true;
}
var cached = await FindBySlugAsync(slug);
return await PageRepository.ExistsAsync(slug);
return cached is not null;
}
}

Loading…
Cancel
Save