forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2.6 KiB
2.6 KiB
Why Does a Redis Command Fail to Take Effect?
Run the command in redis-cli to check whether the command takes effect.
The following describes two scenarios:
- Scenario 1: Set and query the value of a key to check whether the SET and GET commands work.
The SET command is used to set the string value. If the value is not changed, run the following commands in redis-cli to access the instance:
- Scenario 2: If the timeout set using the EXPIRE command is incorrect, perform the following operations:
Set the timeout to 10 seconds and run the TTL command to view the remaining time. As shown in the following example, the remaining time is 7 seconds.
Parent topic: Redis Commands