redis如何在内部执行以下功能。
发布于 2017-07-06 12:56:18
首先,我建议你通过这个职位。在堆栈溢出的答案中,您可以看到您的第一点“内存管理”的答案以及许多其他详细信息。关于第二点,我想告诉您,您可以从可以管理不同可用行为的地方检查redis的默认配置文件。
在redis配置文件中提到了这个片段
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
# is reached. You can select among five behaviors:
#
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key according to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations希望它能对你有帮助。如果我遗漏了什么,请休息,然后请用它来更新我。
https://stackoverflow.com/questions/44945280
复制相似问题