Mhpttl
Bun

method

RedisClient.hpttl

key: KeyLike,
fieldsKeyword: 'FIELDS',
numfields: number,
...fields: KeyLike[]
): Promise<number[]>;

Get TTL of hash fields in milliseconds (Redis 7.4+) Syntax: HPTTL key FIELDS numfields field [field ...]

@returns

Array where each element is: -2 (field doesn't exist), -1 (no expiration), TTL in milliseconds

redis.hpttl("mykey", "FIELDS", 2, "field1", "field2")

Referenced types

type KeyLike = string | ArrayBufferView | Blob