Skip to content

Commit 0cf8279

Browse files
committed
Merge branch 'main' into v17/dev
2 parents 2f712ca + f5da0db commit 0cf8279

File tree

87 files changed

+2881
-1776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2881
-1776
lines changed

src/Umbraco.Cms.Api.Management/OpenApi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48752,4 +48752,4 @@
4875248752
}
4875348753
}
4875448754
}
48755-
}
48755+
}

src/Umbraco.PublishedCache.HybridCache/Extensions/HybridCacheExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ internal static class HybridCacheExtensions
1717
/// Hat-tip: https://github.com/dotnet/aspnetcore/discussions/57191
1818
/// Will never add or alter the state of any items in the cache.
1919
/// </remarks>
20-
public static async Task<bool> ExistsAsync(this Microsoft.Extensions.Caching.Hybrid.HybridCache cache, string key)
20+
public static async Task<bool> ExistsAsync<T>(this Microsoft.Extensions.Caching.Hybrid.HybridCache cache, string key)
2121
{
22-
(bool exists, _) = await TryGetValueAsync<object>(cache, key);
22+
(bool exists, _) = await TryGetValueAsync<T>(cache, key);
2323
return exists;
2424
}
2525

src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public async Task SeedAsync(CancellationToken cancellationToken)
205205

206206
var cacheKey = GetCacheKey(key, false);
207207

208-
var existsInCache = await _hybridCache.ExistsAsync(cacheKey);
208+
var existsInCache = await _hybridCache.ExistsAsync<ContentCacheNode>(cacheKey);
209209
if (existsInCache is false)
210210
{
211211
uncachedKeys.Add(key);
@@ -278,7 +278,7 @@ public async Task<bool> HasContentByIdAsync(int id, bool preview = false)
278278
return false;
279279
}
280280

281-
return await _hybridCache.ExistsAsync(GetCacheKey(keyAttempt.Result, preview));
281+
return await _hybridCache.ExistsAsync<ContentCacheNode>(GetCacheKey(keyAttempt.Result, preview));
282282
}
283283

284284
public async Task RefreshContentAsync(IContent content)

src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public async Task<bool> HasContentByIdAsync(int id)
133133
return false;
134134
}
135135

136-
return await _hybridCache.ExistsAsync($"{keyAttempt.Result}");
136+
return await _hybridCache.ExistsAsync<ContentCacheNode>($"{keyAttempt.Result}");
137137
}
138138

139139
public async Task RefreshMediaAsync(IMedia media)
@@ -170,7 +170,7 @@ public async Task SeedAsync(CancellationToken cancellationToken)
170170

171171
var cacheKey = GetCacheKey(key, false);
172172

173-
var existsInCache = await _hybridCache.ExistsAsync(cacheKey);
173+
var existsInCache = await _hybridCache.ExistsAsync<ContentCacheNode>(cacheKey);
174174
if (existsInCache is false)
175175
{
176176
uncachedKeys.Add(key);

0 commit comments

Comments
 (0)