Support for new HGETDEL, HGETEX and HSETEX commands by atakavci · Pull Request #2863 · StackExchange/StackExchange.Redis (original) (raw)
This PR adds support for new Redis Hash Commands;
- HGETDEL
Get and delete the value of one or more fields of a given hash key
HGETDEL <key> FIELDS <numfields> field [field ...]
- HGETEX
Get the value of one or more fields of a given hash key, and optionally set their expiration
HGETEX <key>
[EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | PERSIST]
FIELDS <numfields> field [field ...]
- HSETEX
Set the value of one or more fields of a given hash key, and optionally set their expiration
HSETEX <key>
[FNX | FXX]
[EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL]
FIELDS <numfields> field value [field value...]
Here the implementation consist of sync and async API s for those commands with adding Lease versions of them when useful.
- HashFieldGetAndDelete
- HashFieldGetAndSetExpiry
- HashFieldSetAndSetExpiry
For more details on commands 👉redis/redis#13798
Redis release including new hash commands 👉https://github.com/redis/redis/releases/tag/8.0-m04