6. 通過(guò)redis命令使用示例:

2018-01-04 11:12 更新

通過(guò)redis命令使用示例:

以下示例顯示了所有的支持的REDIS命令

    [xsky@localhost xhttpcache]$ redis-cli -p 7379
    127.0.0.1:7379> set test hello 
    OK
    127.0.0.1:7379> get test
    "hello"
    127.0.0.1:7379> set test hello ex 1000
    OK
    127.0.0.1:7379> get test
    "hello"
    127.0.0.1:7379> ttl test
    (integer) 988
    127.0.0.1:7379> EXPIRE test 2000
    (integer) 1
    127.0.0.1:7379> ttl test
    (integer) 1998
    127.0.0.1:7379> get test
    "hello"
    127.0.0.1:7379> 

通過(guò)redis命令添加圖片文件到 xhttpcache:

redis-cli -p 7379 -x set getheadimg.jpg <getheadimg.jpg
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)