// 1. 文件管理者
NSFileManager *mgr = [NSFileManager defaultManager];
// 2. 缓存路径
NSString *caches = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
// 3. 清除缓存[mgr removeItemAtPath:caches error:nil];// 4. 重新计算缓存大小
self.fullSize = [caches fileSize];// 5. 设置title等显示
NSString *title = [NSString stringWithFormat:@"缓存大小: %.1fM, (long)self.fullSize/1000.0/1000.0];
self.navigationItem.title = title;iOS 清除缓存
原文:http://www.cnblogs.com/xiaoc1314/p/5671039.html