The Redis EXPIREAT command sets a timeout as a Unix timestamp on a given key. It works the same as the EXPIRE command, but with an absolute Unix timestamp instead of a time interval in seconds (which EXPIRE uses).
NoSQL
Redis PEXPIREAT Command Explained
The Redis PEXPIREAT command sets a timeout as a Unix timestamp on a given key in milliseconds. It works the same as the EXPIREAT command, except that it sets the timeout in milliseconds instead of seconds.
It’s also similar to the PEXPIRE command, but with an absolute Unix timestamp instead of a time interval.
Redis EXPIRE Command Explained
The Redis EXPIRE command sets a timeout on a given key in seconds. After the timeout has expired, the key will be deleted.
Redis also has a PEXPIRE command that works the same as EXPIRE, except that it returns the timeout in milliseconds instead of seconds.
A key with a timeout is said to be volatile in Redis terminology.
Redis STRLEN Command Explained
In Redis, the STRLEN command returns the length of the string stored at a given key.
Redis PSETEX Command Explained
The Redis PSETEX command sets a key to hold a given string value, and sets that key to time out after a given number of milliseconds.
Redis SETEX Command Explained
In Redis, the SETEX command sets a key to hold a given string value, and sets that key to time out after a given number of seconds.
Redis GETDEL Command Explained
The Redis GETDEL command gets the value of a given key, then deletes that key. It’s similar to the GET command, except that it deletes the key on success (the GET command doesn’t delete the key – it only returns its value).
An error is returned if the value stored at key is not a string.
The GETDEL command was introduced in Redis 6.2.0.
Redis DEL Command Explained
In Redis, the DEL command removes one or more keys. If a specified key doesn’t exist, it’s ignored.