Skip to content

Instantly share code, notes, and snippets.

@wudi
Forked from huangzworks/gist:10564625
Last active August 29, 2015 14:18
Show Gist options
  • Save wudi/389b2b58a7c6d23b3edd to your computer and use it in GitHub Desktop.
Save wudi/389b2b58a7c6d23b3edd to your computer and use it in GitHub Desktop.
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