The core solution to prevent multi-graph oom is to use lrucache technology. However, lrucache only manages the storage and release of images in the memory. If an image is removed from the memory, it needs to be reloaded from the network. This is obviously time-consuming. In this regard, Google provides a hard disk cache solution: disklrucache (not officially written by Google, but officially certified ). Unfortunately, the android doc does not provide a detailed description of disklrucache usage, and there is little information about disklrucache on the Internet, so today I want to write a special blog to explain in detail the usage of disklrucache and analyze its working principles. This should be the most detailed information about disklrucache on the Internet.
Let's take a look at which applications have used the disklrucache technology. In my applications, Dropbox, Twitter, Netease news and so on all use disklrucache for hard disk caching. Most people in Dropbox and Twitter should have never used it, so let's start with the most familiar Netease news to have an initial understanding of disklrucache.