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;