Skip to content

Commit 78e9e60

Browse files
authored
Removed unnecessary assignment and allocation (dotnet/extensions#3658)
\n\nCommit migrated from dotnet/extensions@513b3ae
1 parent af038da commit 78e9e60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Caching/StackExchangeRedis/src/RedisCache.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,13 @@ private void Refresh(string key, DateTimeOffset? absExpr, TimeSpan? sldExpr)
423423
options.AbsoluteExpiration.Value,
424424
"The absolute expiration value must be in the future.");
425425
}
426-
var absoluteExpiration = options.AbsoluteExpiration;
426+
427427
if (options.AbsoluteExpirationRelativeToNow.HasValue)
428428
{
429-
absoluteExpiration = creationTime + options.AbsoluteExpirationRelativeToNow;
429+
return creationTime + options.AbsoluteExpirationRelativeToNow;
430430
}
431431

432-
return absoluteExpiration;
432+
return options.AbsoluteExpiration;
433433
}
434434

435435
public void Dispose()

0 commit comments

Comments
 (0)