在redis.c的initServerConfig()方法中,通过调用dictCreate方法初始化server端的命令表.这个命令表是一个hashtable,可以通过key找到相关的命令: /* Command table -- we initiialize it here as it is part of the* initial configuration, since command names may be changed via* redis.conf using the renam…
Redis字符串类型的操作 set key value [ex 秒数] / [px 毫秒数] [nx] /[xx] 如: set a 1 ex 10 , 10秒有效 Set a 1 px 9000 , 9秒有效 注: 如果ex,px同时写,以后面的有效期为准 如 set a 1 ex 100 px 9000, 实际有效期是9000毫秒 nx: 表示key不存在时,执行操作 xx: 表示key存在时,执行操作 如:set hgj123 hgj123.com xx mset multi set ,…