-
-
Save wudi/389b2b58a7c6d23b3edd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1:12345> TTL key # 尚未过期 | |
(integer) 3 | |
127.0.0.1:12345> TTL key | |
(integer) 1 | |
127.0.0.1:12345> TTL key # 虽然键已经过期,但因为我阻塞住了主服务器, | |
(integer) 0 # 而主服务器没办法向从服务器发送 DEL 命令,所以值会一直滞留在从服务器里面。 | |
127.0.0.1:12345> GET key | |
"value" | |
127.0.0.1:12345> TTL key | |
(integer) 0 | |
127.0.0.1:12345> GET key | |
"value" | |
127.0.0.1:12345> TTL key | |
(integer) 0 | |
127.0.0.1:12345> GET key | |
"value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment