Skip to content

Commit e6831a4

Browse files
authored
Merge pull request #328 from mokarchi/feat-redis-refactor
Null coalescing assignment
2 parents d93f7ba + 14e7f01 commit e6831a4

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)