//清除UIWebView的缓存
[ [NSURLCache sharedURLCache ]removeAllCachedResponses];
附:NSUrlcache的公有方法
- (void)removeCachedResponseForRequest:(NSURLRequest *)request;
- (void)removeAllCachedResponses;
获取当前缓存大小:
/*!
@method currentMemoryUsage
@abstract Returns the current amount of space consumed by the
in-memory cache of the receiver.
@discussion This size, measured in bytes, indicates the current
usage of the in-memory cache.
@result the current usage of the in-memory cache of the receiver.
*/
- (NSUInteger)currentMemoryUsage;
/*!
@method currentDiskUsage
@abstract Returns the current amount of space consumed by the
on-disk cache of the receiver.
@discussion This size, measured in bytes, indicates the current
usage of the on-disk cache.
@result the current usage of the on-disk cache of the receiver.
*/
- (NSUInteger)currentDiskUsage;