Cannot set SlidingExpiration and AbsoluteExpirationRelativeToNow on RedisCache #194
Description
When using the RedisCache you can set both a SlidingExpiration and an AbsoluteExpiration. For example, you can set a sliding expiration of 5 seconds and an absolute expiration of 60 seconds. If the cached item is accessed every 5 seconds it will remain in cache up until 60 seconds from the original creation.
However, this only works if you are setting the DistributedCacheEntryOptions.AbsoluteExpiration property. If you set the DistrubutedCacheEntryOption.AbsoluteExpirationRelativeToNow then only the sliding expiration is respected/used.
The meta-data stored in Redis for each cache entry includes only the SlidingExpiration and the AbsoluteExpiration values, but ignores the AbsoluteExpirationRelativeToNow property.
The AbsoluteExpirationRelativeToNow property is very convenient (as the caller often doesn't want to have to worry about calculating the actual expiration time, just specifying how far into the future it should be). However, it seems that this property should really cause all the same behaviors as the AbsoluteEpiration property.
Thanks for listening!