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
Resolves#1740
Should add support for all current options of [GETEX](https://redis.io/commands/getex).
Questionable (non-)decisions (opinions wanted!):
* I called the new methods `StringGet[Async]` as the behaviour is most similar to plain `StringGet` and I think the added expiry functionality is communicated by the parameters.
* The relative expiry overload takes `TimeSpan?` while the absolute overload takes non-nullable `DateTime`. I don't like it, but I did this as I realised I'd have to cast to escape ambiguity: `(TimeSpan?)null` 🤮. But maybe consistency is more important?
* I looked in the `tests` folder and cried a little; I have no idea what I'm supposed to update there. I just bumped the Redis version in `Dockerfile` since Docker is easy and you seem to use it in your GitHub actions.
* I placed the tests in `Strings`, even though they involve expiry and the tests themselves go against the pattern in that file a bit. Felt better than bloating something catch-all like `BasicOps`.
Co-authored-by: Nick Craver <nrcraver@gmail.com>
https://redis.io/commands/getex
It's a useful feature!
The text was updated successfully, but these errors were encountered: