Skip to content

Commit

Permalink
Null coalescing assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
mokarchi committed Nov 9, 2021
1 parent d93f7ba commit 14e7f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EasyCaching.Redis/DefaultRedisCachingProvider.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public override async Task<TimeSpan> BaseGetExpirationAsync(string cacheKey)
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));

var timeSpan = await _cache.KeyTimeToLiveAsync(cacheKey);
return timeSpan.HasValue ? timeSpan.Value : TimeSpan.Zero;
return timeSpan ?? TimeSpan.Zero;
}
}
}

0 comments on commit 14e7f01

Please sign in to comment.