您的位置:首页 > 其它

一个简单可以设定时间的数据缓存库 (附 源码)

2016-02-01 15:17 232 查看
创建类 MCDataCacheManager * cache = [MCDataCacheManager shareInstance];

设定数据默认过期的时间 [cache MCsetDefautExpireTime:15];

判断 API 加载的数据是否过期 [cache MCcheckExpireFile:@”API”]

如果过期 写入新数据[cache MCwriteDefautExpireData:testParam withFile:@”API”];

如果未过期直接加载缓存数据 [cache MCreadData:@”API”]

更多功能请看源码

源码地址:https://github.com/CZXBigBrother/MCDataCacheManager
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  数据 缓存 源码 api