创建类 MCDataCacheManager * cache = [MCDataCacheManager shareInstance];
设定数据默认过期的时间 [cache MCsetDefautExpireTime:15];
判断 API 加载的数据是否过期 [cache MCcheckExpireFile:@”API”]
如果过期 写入新数据[cache MCwriteDefautExpireData:testParam withFile:@”API”];
如果未过期直接加载缓存数据 [cache MCreadData:@”API”]
更多功能请看源码
源码地址:https://github.com/CZXBigBrother/MCDataCacheManager