From 946e8fcc2d5f507c47f34c3fb3001a6cbc7d94b8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 13 Sep 2026 17:00:36 +0200 Subject: [PATCH] Restore CultCache.TryGet: the audit missed AquaSynth's call The Cut 2 subtraction audit listed TryGet as unused, but AquaSynth\src\AquaSynth.Core\CultCachePatchDocument.cs:104 calls cache.TryGet(key, out CultCachePatchDocument? document). The map's grep matched only TryGetByName/TryGetByIndex, so the call was missed and AquaSynth.Core, AquaSynth.Faust, AquaSynth.Dsl.Tests and AquaSynthDaemon stopped compiling against 85f2089. The method returns with the signature it had at e9b91c1. Co-Authored-By: Claude Opus 5 --- src/GameCult.Caching/CultCache.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/GameCult.Caching/CultCache.cs b/src/GameCult.Caching/CultCache.cs index 8cf59d40..609bda17 100644 --- a/src/GameCult.Caching/CultCache.cs +++ b/src/GameCult.Caching/CultCache.cs @@ -1322,6 +1322,12 @@ namespace GameCult.Caching return Get(key) as T; } + public bool TryGet(CultRecordKey key, out T? document) where T : class + { + document = Get(key); + return document != null; + } + public IEnumerable GetAll() where T : class { lock (_stateGate)