Skip to content

Commit

Permalink
Merge pull request #328 from mokarchi/feat-redis-refactor
Browse files Browse the repository at this point in the history
Null coalescing assignment
  • Loading branch information
catcherwong authored Nov 10, 2021
2 parents d93f7ba + 14e7f01 commit e6831a4
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 e6831a4

Please sign in to comment.