工作上没机会用到Redis
自己就搞一个来玩,以后工作说不定也会用到
Redis是什么
官网:https://redis.io/documentation是一种in-memory,使用key-value资料结构的资料库,在需要资料不需要持久性储存时,实作cache时是相当方便的首选
安装
我是mac,而且有装homebrew,不得不说homebrew真的有够好用XD
Redis
brew install redis
Another Redis Desktop Manager
官网:https://github.com/qishibo/AnotherRedisDesktopManager/brew install --cask another-redis-desktop-manager
Redis Desktop Manager(另一个选择,没装)
https://github.com/uglide/RedisDesktopManagerPing redis server
预设的port是6379
redis-server // 启动redis
接着到另一个terminal tab连线
redis-cliping
成功~~~~
Redis for Go
官网:https://github.com/go-redis/redis记得要使用go mod
redis有分版本
go mod initgo get github.com/go-redis/redis/v8
总结
今天先把安装跟基本使用给记录下来
实作写在另外一篇,这样分层比较好找,篇幅也不会太长
而且该睡了XD
最近这几个月会把Postgre/Maria/Redis/Mongo/研究一遍
再来有机会来搞AWS/AWS Dynamo/Hodoop
还有做个Load balance