Level three cache 1, first-level cache memory cache access fast, high efficiency, may cause memory overflow from the top down, the level is getting lower and stronger references, only when there is no reference to the virtual machine is recycled soft reference, when the memory is low, the virtual opportunity to automatically reclaim the soft reference reference of the object weak reference, when the As soon as the creation is complete, the virtual machine detects the memory continuously, when the weak reference is detected, the virtual reference is recovered and the VM is recycled at any time.
After Android 3.0, this is not recommended, it is recommended to use the LRUCache most recently used principle when memory is low, recycle objects that are infrequently used or are not used recently
2. Level two cache, local cache, cache to the files inside the Android, access slightly faster, save traffic
3. Level three cache, network cache
Implementation process: According to the URL to find a picture, how to find: 1. From the memory to find pictures, if found, directly show, if not found, from the local search, 2. Local cache to find, found on the show. Start accessing the network 3. Access the network to find Pictures 3.1 network find pictures, cache pictures to this Ground and memory 3.2 show pictures
1. Get the picture from memory newLRUCache
2. Get Pictures locally
How to store pictures locally
3. Get Pictures online
From for notes (Wiz)
Level three cache of pictures