推荐链接:
总结——》【Java】
总结——》【Mysql】
总结——》【Redis】
总结——》【Spring】
总结——》【SpringBoot】
总结——》【MyBatis、MyBatis-Plus】
Redis——》内存最大限制
方式1:修改redis.conf
# 打开
vim redis.conf
# 修改maxmemory值,以下写法均可以
maxmemory 1024000
maxmemory 1GB
maxmemory 1G
maxmemory 1024KB
maxmemory 1024K
maxmemory 1024MB
方式2:通过客户端修改maxmemory
# 进入客户端
./redis-cli -h 10.122.139.50 -p 6379
# 设置maxmemory
config set maxmemory 1GB
# 查看maxmemory
config get maxmemory
# 覆盖配置
config rewrite
# 退出客户端
exit