White Lotus
White Lotus

Reputation: 363

Removing Hash, and expireat

There are 2 commands in keys I want to apply to hashes. However I can't seem to find documentation on whether or not they exists. Does anyone have a clue?

EXPIREAT - removes key after a specified unix timestamp. * Is there a way to expire a hash after a certain time?

HDEL - deletes a field of a hash * how do I delete the entire hash not just the field?

Upvotes: 0

Views: 203

Answers (1)

Karthikeyan Gopall
Karthikeyan Gopall

Reputation: 5679

hashes itself is a key. So you can apply both EXPIREAT and DEL commands on hash.

EXPIREAT hashname -> will expire the whole hash. you can't expire a single member in hash.

DEL hashname -> will delete the whole hash.

Upvotes: 1

Related Questions