Add nullability to nucache & lucene projects

This commit is contained in:
Nikolaj Geisle
2022-03-30 13:34:56 +02:00
parent b52c4e50cf
commit 05a08bef63
105 changed files with 736 additions and 619 deletions

View File

@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string LangId(string culture)
private static string LangId(string? culture)
=> string.IsNullOrEmpty(culture) ? string.Empty : ("-L:" + culture);
public static string PublishedContentChildren(Guid contentUid, bool previewing)
@@ -49,12 +49,12 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
// a valid ID in the database at that point, whereas content and properties
// may be virtual (and not in umbracoNode).
public static string ContentCacheRouteByContent(int id, bool previewing, string culture)
public static string ContentCacheRouteByContent(int id, bool previewing, string? culture)
{
return "NuCache.ContentCache.RouteByContent[" + DraftOrPub(previewing) + id + LangId(culture) + "]";
}
public static string ContentCacheContentByRoute(string route, bool previewing, string culture)
public static string ContentCacheContentByRoute(string route, bool previewing, string? culture)
{
return "NuCache.ContentCache.ContentByRoute[" + DraftOrPub(previewing) + route + LangId(culture) + "]";
}