Android caches images and other data

The LRU algorithm of LinkedHashMap is used to cache data, which can detect whether the object has been recycled by the virtual machine, recalculate the current cache size, and clear the useless key value objects in the cache (that is, the data that has been recycled by the virtual machine but not cleared from the cache)* The default memory cache size is 4 * 1024 * 1024. You can reset the cache size through setmaxcachesize and empty the memory cache manually * < br > support memory cache and disk cache, and support HTTP cache through {@ link CC. Util. Cache. Netbytewrapper} (Note: refer to cc.util. HTTP package for details); Note: use JDK7

The above is the whole content of this article. I hope you can like it.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>