Cache-based list processing method on android platform
暂无分享,去创建一个
The invention discloses a cache-based list processing method on an android platform. The cache-based list processing method on the android platform comprises the following steps that S100, two levels of cache are set, wherein the first level of cache is LinkedHashMap , and the second level of cache is ConcurrentHashMap >; S200, the first level of cache reserves the strong reference of Bitmap through the LinkedHashMap , and the size of cache is controlled to be MAX_CAPACITY=10; S300, when data continue to be stored in the cache, the least and recently used elements in the first level of cache are put into the second level of cache ConcurrentHashMap >, and SoftReference of Bitmap is reserved in the second level of cache. The user experience is improved, and resources are saved.