Vue cache algorithm, LRU policy algorithm

LRU is short for least recently used. Its main principle is to eliminate data according to historical access records. Its storage structure is a double linked list. The recently accessed data is placed at the tail of the double linked list, and the first accessed data is placed at the head. The core idea is that the probability of being accessed after being accessed recently will become higher. You can delete those that have not been accessed before and maintain a stable maximum capacity value, so as not to cause memory overflow. For the specific flow of the algorithm, you can refer to the visualization process of this flow chart to simulate the scheduling process of LRU algorithm.