Android Development Strategy: Caching

Source: Internet
Author: User

1. When using the cache policy, priority is given to the use of sdcard (the need to determine whether the SD card and its remaining space is sufficient, to open up a certain space, such as 10M);

2. Get the picture, first look up from the sdcard, some words use the picture and update the last time the picture was used, did not go through the URL to download;

3. Go to the server to download the picture, if the download is successful, put into the sdcard (need to determine whether the 10M space has been used up, if not run out of the save, if not enough space based on the LRU rules to delete some of the recently unused resources), and use, if failed, there should be a retry mechanism, such as 3 times ;

Android Development Strategy: Caching

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.