Skip to content

Commit 4441e77

Browse files
committed
Minor cleanup
1 parent 24ebeca commit 4441e77

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/ZiggyCreatures.FusionCache/FusionCache_Async.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ public partial class FusionCache
292292
if (_logger?.IsEnabled(LogLevel.Debug) ?? false)
293293
_logger.LogDebug("FUSION (O={CacheOperationId} K={CacheKey}): calling GetOrSetAsync<T> {Options}", operationId, key, options.ToLogString());
294294

295-
// TODO: MAYBE WE SHOULD AVOID ALLOCATING A LAMBDA HERE, BY CHANGING THE INTERNAL LOGIC OF THE GetOrSetEntryInternalAsync METHOD
296295
var entry = await GetOrSetEntryInternalAsync<TValue>(operationId, key, (_, _) => Task.FromResult(defaultValue), false, default, options, token).ConfigureAwait(false);
297296

298297
if (entry is null)

src/ZiggyCreatures.FusionCache/FusionCache_Sync.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ public partial class FusionCache
292292
if (_logger?.IsEnabled(LogLevel.Debug) ?? false)
293293
_logger.LogDebug("FUSION (O={CacheOperationId} K={CacheKey}): calling GetOrSet<T> {Options}", operationId, key, options.ToLogString());
294294

295-
// TODO: MAYBE WE SHOULD AVOID ALLOCATING A LAMBDA HERE, BY CHANGING THE INTERNAL LOGIC OF THE GetOrSetEntryInternal METHOD
296295
var entry = GetOrSetEntryInternal<TValue>(operationId, key, (_, _) => defaultValue, false, default, options, token);
297296

298297
if (entry is null)

src/ZiggyCreatures.FusionCache/Internals/FusionCacheInternalUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public static bool IsLogicallyExpired(this IFusionCacheEntry? entry)
9999

100100
public static Exception GetSingleInnerExceptionOrSelf(this AggregateException exc)
101101
{
102-
// TODO: NOT SURE ABOUT THIS
103-
//if (exc is null)
104-
// return null;
102+
if (exc is null)
103+
throw new ArgumentNullException(nameof(exc));
104+
105105
return (exc.InnerException is not null && exc.InnerExceptions?.Count <= 1)
106106
? exc.InnerException
107107
: exc

0 commit comments

Comments
 (0)