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)