Skip to content

Instantly share code, notes, and snippets.

@wanghuaisheng
Created March 23, 2018 02:27
Show Gist options
  • Save wanghuaisheng/c8621363ac0b9ac38e787d576e0d8d64 to your computer and use it in GitHub Desktop.
Save wanghuaisheng/c8621363ac0b9ac38e787d576e0d8d64 to your computer and use it in GitHub Desktop.
Redis理解

key 在中文翻译中,有翻译成键的,我这里保留为key。

type 包含5种数据类型,String,Hash,List,Set,Sorted Set。

value 主要关注的便是对应的数据结构和特性

String 可以简单的理解成Map<String, String>

Hash 可以简单的理解成Map<String,Map<String,String>>

List 可以简单的理解成Map<String, List> 当然这里的List一般也理解成LinkedList

Set Map<String,Set> zset 这个稍微复杂点,Map<String, SortedSet>外加一个Map<String, Map<String, Double>>

命令 学习命令最好的方式便是打一遍。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment