Home / node / Commands / interfaces / HGetExOptions @valkey/valkey-glide
@valkey/valkey-glide / Commands / HGetExOptions
Interface: HGetExOptions
Optional arguments for the HGETEX command.
Example
// Get fields and set 30 second expiration
const options: HGetExOptions = {
expiry: { type: TimeUnit.Seconds, count: 30 }
};
// Get fields and remove expiration
const persistOptions: HGetExOptions = {
expiry: "PERSIST"
};
See https://valkey.io/commands/hgetex/ for more details.
Properties
expiry?
optional
expiry:HGetExExpiry
Expiry settings for the fields. Can be a time-based expiry or "PERSIST" to remove expiration.