zoukankan      html  css  js  c++  java
  • 【Redis】基本使用

    Redis从入门到精通

    1、List

    基本的数据类型、列表。在redis里面,我们可以把list玩成栈、队列、阻塞队列。

    所有的list命令都是l开头的。

     127.0.0.1:6379> lpush list one  #从左插入值
     (integer) 1
     127.0.0.1:6379> lpush list two
     (integer) 2
     127.0.0.1:6379> lpush list three
     (integer) 3
     127.0.0.1:6379>
     127.0.0.1:6379> lrange list 0 -1  #获取值
     1) "three"
     2) "two"
     3) "one"
     127.0.0.1:6379>
     127.0.0.1:6379> rpush list four #从右插入
     (integer) 4
     127.0.0.1:6379> lrange list 0 -1 #获取值
     1) "three"
     2) "two"
     3) "one"
     4) "four"

     

  • 相关阅读:
    windows nginx
    stdClass 标准
    array_merge
    array_pop
    array_push
    array_unique
    GMT与UTC简介(转)
    curl-手册
    13.5. zipfile — Work with ZIP archives
    7. Input and Output
  • 原文地址:https://www.cnblogs.com/sheep9527/p/14608132.html
Copyright © 2011-2022 走看看