Skip to content

Home / node / Commands / type-aliases / HGetExExpiry @valkey/valkey-glide


@valkey/valkey-glide / Commands / HGetExExpiry

Type Alias: HGetExExpiry

HGetExExpiry = { count: number; type: TimeUnit; } | "PERSIST"

Expiry options specifically for HGETEX command. Supports standard expiry options (EX/PX/EXAT/PXAT) and PERSIST, but excludes KEEPTTL.

Example

// Set expiration to 30 seconds
const expiry: HGetExExpiry = { type: TimeUnit.Seconds, count: 30 };

// Remove expiration
const persist: HGetExExpiry = "PERSIST";