Redis

https://redis.io/

一、Mac安装Redis

复制代码
$brew search redis //查看redis
$brew install redis //安装redis
//启动redis,方式1:
$brew services start redis
//方式2
#指定参数启动,后台启动需这样做
$ redis-server /usr/local/etc/redis.conf
#默认参数启动,这样启动关闭窗口后即停止,不推荐
$ redis-server
复制代码

 redis 默认安装在/usr/local/Cellar下,配置文件redis.conf在/usr/local/etc下。

连接服务默认端口为6379

 

二、Redis常见指令

redis-server -v //查看redis版本
$ redis-cli
$ redis-cli -h host -p port -a password  //远程

 

三、Redis的数据结构类型

string 

 

 

 四、Redis在缓存中的应用

 

 

 

https://dongzl.github.io/2021/07/18/10-Redis-Data-Type-Storage-Structure/

posted @   尘恍若梦  阅读(14)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
点击右上角即可分享
微信分享提示