Alibaba cloud Q & A 2022-02-13 08:24:50 阅读数:684
If you want to Redis The expiration key of is used for inert expiration processing , What to do ？
Only when visiting one key when , Only then can we judge that key Has it expired , If it expires, it will be removed . This strategy can maximize savings CPU resources , But it's not very memory friendly . In extreme cases, there may be a large number of overdue key Not visited again , So it won't be removed , Take up a lot of memory .
copyright：author[Alibaba cloud Q & A]，Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130824483264.html