Using the Three20 framework will produce a lot of cache files, which are stored in the application's caches/Three20/folder. After a long time, it will occupy a lot of storage space. In this case, you need to provide an entry to clear the cache. For example, on the setting page, we need to display the cache size before deletion, prompt whether the current cache needs to be cleared: the method for calculating the cache size is as follows: [cpp] dispatch_async (dispatch_get_global_queue (queue, 0), ^ (void) {NSArray * paths = Queue (NSCachesDirectory, NSUserDomainMask, YES); NSString * path = [[paths objectAtIndex: 0] stringByAppendingPathComponent: @ "/Three20/"]; NSFileManager * fileManager = [NSFileMana Ger defaultManager]; if ([fileManager fileExistsAtPath: path]) {NSEnumerator * childEnumber = [[fileManager subpathsOfDirectoryAtPath: path error: nil] objectEnumerator]; unsigned long folderSize = 0; NSString * fileName; while (fileName = [childEnumber nextObject])! = Nil) {NSString * childFilePath = [path stringByAppendingPathComponent: fileName]; folderSize + = [fileManager attributesOfItemAtPath: childFilePath error: nil]. fileSize;} dispatch_async (dispatch_get_main_queue (), ^ (void) {abstrachebutton. text = [NSString stringWithFormat: @ "clear image cache (% 0.1f Mb)", (float) folderSize/1000/1000]; [self reloadTableCells] ;}}); dispatch_async (dispatch_get_global_queue (D Dependencies, 0), ^ (void) {NSArray * paths = NSSearchPathForDirectoriesInDomains (NSCachesDirectory, NSUserDomainMask, YES); NSString * path = [[paths objectAtIndex: 0] stringByAppendingPathComponent: @ "/Three20/"]; NSFileManager * fileManager = [NSFileManager defaultManager]; if ([fileManager fileExistsAtPath: path]) {NSEnumerator * childEnumber = [[fileManager subpathsOfDirectoryAtPat H: path error: nil] objectEnumerator]; unsigned long folderSize = 0; NSString * fileName; while (fileName = [childEnumber nextObject])! = Nil) {NSString * childFilePath = [path stringByAppendingPathComponent: fileName]; folderSize + = [fileManager attributesOfItemAtPath: childFilePath error: nil]. fileSize;} dispatch_async (dispatch_get_main_queue (), ^ (void) {abstrachebutton. text = [NSString stringWithFormat: @ "clear image cache (% 0.1f Mb)", (float) folderSize/1000/1000]; [self reloadTableCells] ;}}); for details about how to use GCD, refer to Grand Central Dispatch (G CD) It takes some time to calculate the file size when there are too many cached files. How to clear the cache: [cpp] [[TTURLCache sharedCache] removeAll: YES]; [[TTURLCache sharedCache] removeAll: YES];