Hybrid cache: Check for ContentCacheNode instead of object on exists for hybrid cache to ensure correct deserialization (closes #20352) (#20383)

Checked for ContentCacheNode instead of object on exists for hybrid cache to ensure correct deserialization.
This commit is contained in:
Andy Butland
2025-10-06 21:20:16 +02:00
committed by GitHub
parent 4330a99830
commit 184c17e2c8
4 changed files with 13 additions and 12 deletions

View File

@@ -205,7 +205,7 @@ internal sealed class DocumentCacheService : IDocumentCacheService
var cacheKey = GetCacheKey(key, false);
var existsInCache = await _hybridCache.ExistsAsync(cacheKey);
var existsInCache = await _hybridCache.ExistsAsync<ContentCacheNode>(cacheKey);
if (existsInCache is false)
{
uncachedKeys.Add(key);
@@ -278,7 +278,7 @@ internal sealed class DocumentCacheService : IDocumentCacheService
return false;
}
return await _hybridCache.ExistsAsync(GetCacheKey(keyAttempt.Result, preview));
return await _hybridCache.ExistsAsync<ContentCacheNode>(GetCacheKey(keyAttempt.Result, preview));
}
public async Task RefreshContentAsync(IContent content)