You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a bug in the way I was calculating the expiration timespan to use when Putting items into a redis backed cache, I started receiving "Specified cast is not valid" exceptions when retrieving the item with the bad expiry time.
This seemed to be triggered if the expiry TimeSpan was a negative value (ie: in the past)
Maybe there should be some guarding against Adding/Putting already expired items, to avoid bad metadata making it into the cache?
Hello,
Due to a bug in the way I was calculating the expiration timespan to use when Putting items into a redis backed cache, I started receiving "Specified cast is not valid" exceptions when retrieving the item with the bad expiry time.
This seemed to be triggered if the expiry TimeSpan was a negative value (ie: in the past)
Maybe there should be some guarding against Adding/Putting already expired items, to avoid bad metadata making it into the cache?
Here's the stacktrace:
Thanks,
Greg
The text was updated successfully, but these errors were encountered: