ssdb中TTL的使用,ssdbTTL使用

來源:互聯網
上載者:User

ssdb中TTL的使用,ssdbTTL使用
[nerd@QA tools]$ ./ssdb-cli -p 8999
ssdb (cli) - ssdb command line tool.
Copyright (c) 2012-2014 ssdb.io


'h' or 'help' for help, 'q' to quit.


server version: 1.8.0


ssdb 127.0.0.1:8999> TTL 01:00000:0096683ed3d3851st
242642
(0.001 sec)
ssdb 127.0.0.1:8999> 


ssdb 127.0.0.1:8999> set key value
ok
(0.001 sec)
ssdb 127.0.0.1:8999> get key
value
(0.000 sec)
# key 存在,但沒有設定剩餘存留時間
ssdb 127.0.0.1:8999> TTL key
-1
(0.000 sec)
# 有剩餘存留時間的 key
ssdb 127.0.0.1:8999> EXPIRE key 10086
1
(0.001 sec)
# 查看剩下存留時間的 key
ssdb 127.0.0.1:8999> TTL key
10079

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.