Tencent / LKImageKit

A high-performance image framework, including a series of capabilities such as image views, image downloader, memory caches, disk caches, image decoders and image processors.
Other
2.08k stars 287 forks source link

why clear LRUQueue first in [LKImageMemoryCache clearLastOne function] #15

Closed zq54zquan closed 6 years ago

zq54zquan commented 6 years ago

according the source code ,the items in FIFOQueue just been used once , i think its item should be deleted before the LRUQueue. right?

kelingjie1 commented 6 years ago

Because FIFO is changing very fast. Image in FIFO may be used just a few seconds. LRU is more stable. The last image in LRU should be old. So we remove last one in LRU.