#pragma mark ---获取缓存的大小 --- - (void) getSizeCache{ CGFloat size = [SDImageCache sharedImageCache].getSize / 1000.0 /1000; [self.cancelCacheButton setTitle:[NSString stringWithFormat:@" 缓存大小为:%.2fMB", size] forState:UIControlStateNormal]; } #warning mark --- 点击清除缓存实现的方法 --- - (IBAction)cancelCache:(id)sender { [[SDImageCache sharedImageCache] clearDisk]; [self.cancelCacheButton setTitle:@" 缓存大小为:0.00MB" forState:UIControlStateNormal]; }