Golang - Redis基本介绍

工作上没机会用到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/RedisDesktopManager

Ping redis server

预设的port是6379

redis-server // 启动redis

http://img2.58codes.com/2024/20118878eJmwOqTu9i.png

接着到另一个terminal tab连线

redis-cliping

http://img2.58codes.com/2024/20118878fIbmlXugRm.png

成功~~~~

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

参考来源

https://marcus116.blogspot.com/2020/04/tool-redis-another-redis-desktop-manager.html

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章