redis报错OOM command not allowed when used memory > ‘maxmemory‘
redis>info memory作为内存数据库,为了防止redis占用过多的内存对其他的应用程序造成影响,redis的使用者可以在redis.conf文件中通过设置maxmemory选项对redis所能够使用的最大内存做限制,并通过maxmemory_policy对redis占用内存超过maxmemory之后的行为做定制。redis源码中的内存管理策略都存在于evict.c文件中,其中最重要的一个函数就是freeMemoryIfNeeded。该函数用于在redis占用的内存超过m