摘要:
redis = new Redis(); empty($config) or $this->connect($config); } // 连接redis服务器 public function connect($config = array()) { if (!empty($config)) { $this-... 阅读全文
posted @ 2016-09-20 15:55
东歌
阅读(3458)
评论(0)
推荐(0)
摘要:
什么是hash ? 在网上找了好久都没找到简截有力的说明。hash 我把它当成是集合,一个hash 就是一个集合,里面字段对应一个元素,元素不重复,字段都不一样。 简单hash 命令 1、hset 哈希名 字段 值 (设置hash 一次只设置一个字段) hset hash_name field "o 阅读全文
posted @ 2016-09-20 15:07
东歌
阅读(164)
评论(0)
推荐(0)
摘要:
#最近项目中要求跨服务器同步数据,想到两种解决办法#方法1 http请求#通过curl 将数据同步到另外系统,但http不确定因素太多丢失部分数据且没办法做记录#方法2 异步队列#在发送端做定时推送,数据存储到redis中,redis将存储的数据分发到接收接口 阅读全文
posted @ 2016-09-20 11:02
东歌
阅读(244)
评论(0)
推荐(0)
摘要:
一维json { "sn" : "CS20160918095444121640", "suitstypes_id" : "47", "test" : "0", "type" : "4" } 二维json [ { "mac" : "98:7B:F3:35:FE:B6", "name" : "FitSc 阅读全文
posted @ 2016-09-20 10:15
东歌
阅读(281)
评论(0)
推荐(0)

浙公网安备 33010602011771号