当前位置:网站首页>Redis cache

Redis cache

2022-07-04 21:19:00 Daily enlightenment

redis As caching :
Cache is not full , Caching should change with access

LFU: How many times

LRU: How long has it been

key The validity of the : Will not extend with the visit

EXPIRE k1 50

Set expiration time  

key The validity of the : Occurrence write , The expiration time will be excluded

Principle of expiration determination :

(1) Passive access decision

(2) Periodic rotation judgment ( The incremental )

Sacrifice memory a little , keep redis Performance of

原网站

版权声明
本文为[Daily enlightenment]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207042018229853.html