一行代码将请求数据写入磁盘缓存-支持CocoaPods. 1.写入(参数1:服务器返回的JSON数据, 参数2:数据请求URL) [XHNetworkCache saveJsonResponseToCacheFile:responseObject andURL:URLString]; 2.读取(参数:请求URL,返回:JSON数据) id JsonCache = [XHNetworkCache cacheJsonWithURL:URLString]; 详见github 代码地址:https://github.com/CoderZhuXH/XHNetworkCache