Open changjl317 opened 3 years ago
这个跟 Redis 的内存回收策略有关。 Redis 的默认回收策略是 noenviction,当内存用完之后,写数据会报错。 Redis 的其他内存回收策略含义: volatile-lru:从已设置过期时间的数据集(server.db[i].expires)中,淘汰最近最少使用的数据 volatile-ttl:从已设置过期时间的数据集(server.db[i].expires)中,淘汰最早会过期的数据 volatile-random:从已设置过期时间的数据集(server.db[i].expires)中,随机淘汰数据 allkeys-lru:从数据集(server.db[i].dict)中,淘汰最近最少使用的数据 allkeys-random:从数据集(server.db[i].dict)中,随机淘汰数据
请在下面作答