Skip to content

Commit 14e7f01

Browse files
committed
Null coalescing assignment
1 parent d93f7ba commit 14e7f01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EasyCaching.Redis/DefaultRedisCachingProvider.Async.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public override async Task<TimeSpan> BaseGetExpirationAsync(string cacheKey)
366366
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
367367

368368
var timeSpan = await _cache.KeyTimeToLiveAsync(cacheKey);
369-
return timeSpan.HasValue ? timeSpan.Value : TimeSpan.Zero;
369+
return timeSpan ?? TimeSpan.Zero;
370370
}
371371
}
372372
}

0 commit comments

Comments
 (0)