我通过sadd写入set中一些数据,但是过个一两天数据就会丢失?
没有设置logfile,所以日志暂时看不到。
初学redis,还不太懂。
天蓬老师2017-04-25 09:04:27
Check if the memory is not enough. If the memory is not enough, redis will recycle the memory. The specific strategy is as follows:
volatile-lru: Select from the data set (server.db[i].expires) with an expiration time set The least recently used data is eliminated
volatile-ttl: Select the data to be expired from the data set (server.db[i].expires) with an expiration time set.
volatile-random: From the data set with an expiration time set (server.db[i].expires) Server.db[i].expires) arbitrarily select data to eliminate
allkeys-lru: Select the least recently used data from the data set (server.db[i].dict) to eliminate
allkeys-random: Select from the data set (server .db[i].dict) to eliminate any selected data
no-enviction (eviction): prohibit the eviction of data
ringa_lee2017-04-25 09:04:27
Is certain data lost or all redis data lost?
If it is all, there may be a task to clear redis regularly.
If there is only a part of the data in the set, it may only be deleted manually.
Only the key type has expiration time. Collection no.
Look at the log.