SDWebImage-01
SDWebImage默认沙盒缓存时长是一个星期,单位是秒(second);
1 // 当app接收到内存警告 2 - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application 3 { 4 SDWebImageManager *mgr = [SDWebImageManager sharedManager]; 5 6 // 1,取消正在下载对操作 7 [mgr cancelAll]; 8 9 // 2,清除内存缓存 10 [mgr.imageCache clearMemory]; 11 12 // mgr.imageCache.maxCacheAge = 1 * 24 * 60 * 60 * 7; // one week 13 // mgr.imageCache.maxCacheSize // bytes 14 }