You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
595 B
595 B
Redis二层封装使用说明
[TOC]
技术选型
主要依赖库go-redis
使用规范
- 从配置文件中读取Redis的链接、密码、数据库定义信息
- 调用
redisHandle.InitRedis方法,获取全部的连接池;也可自定义其中的dbs参数,只获取需要的连接池 - 连接池的每个元素为一个
RedisClient,调用该元素的Set和Get方法即可
其他
目前只封装了Set和Get方法,根据往届经验,用到的场景可能没有那么多,如果需要更强大的功能再进行封装或直接使用go-redis的api