Android development policy: cache and android Development Policy

Source: Internet
Author: User

Android development policy: cache and android Development Policy

1. When using the cache policy, the use of sdcard is preferred (you must first determine whether there is an SD card and whether the remaining space is sufficient, and then open up a certain amount of space, such as 10 MB );

2. Find the image from the sdcard when obtaining the image. If yes, use the image and update the last time the image was used. If not, download the image through the URL;

3. go to the server to download the image. If the download is successful, put it on the sdcard (you need to first determine whether the 10 m space is used up, and save it if it is not used up, if there is not enough space, delete some resources that have not been used recently according to the LRU rule, and use the resource. If it fails, there should be a Retry Mechanism, for example, three times;

Related Article

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.