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
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
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.
There should be an expiration date, I don’t know much about it
http://huangyunbin.iteye.com/blog/1894583