Closed zhangliuliu closed 8 years ago
Can you provide more information about "not work"?
就是说用setObject forKey保存object是成功的,但是换成setObject withBlock保存同样的object好像就不行,因为我再次用objectForKey取的时候发现没有数据。
在2016年03月29日 21:25,Yaoyuan 写道:Can you provide more information about "not work"?
—You are receiving this because you authored the thread.Reply to this email directly or view it on GitHub
_cache = [YYCache cacheWithName:@"test"];
[_cache setObject:@"aa" forKey:@"a"];
NSLog(@"%@", [_cache objectForKey:@"a"]);
[_cache setObject:@"bb" forKey:@"b" withBlock:^{}];
NSLog(@"%@", [_cache objectForKey:@"b"]);
2016-03-29 22:02:22.247 CacheBenchmark[8901:255621] aa
2016-03-29 22:02:22.248 CacheBenchmark[8901:255621] bb
并没有问题
setObject: forKey: withBlock not work... but setObject: forKey: works ,why?