We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我用YYCache缓存IM来的私信,在全剧队列里缓存。 代码片段:
YYCache *cache = [BaseController sharedCacheManager]; //返回一个static cache NSMutableDictionary *userDataDic = [[NSMutableDictionary alloc]initWithDictionary:(NSDictionary *)[cache.diskCache objectForKey:account]];
xxxx操作xxxxx
[cache.diskCache setObject:userDataDic forKey:account];
这么做有问题吗?因为私信可能随时会有,有可能造成前一个私信缓存未完成,就来了有下一个需要缓存的私信。
The text was updated successfully, but these errors were encountered:
@BigWhiteEat yycache里面是带锁的,只要是同一个db文件,前面的缓存没做完下一个不会开始,整体是thread safe的应该不会有问题
Sorry, something went wrong.
No branches or pull requests
我用YYCache缓存IM来的私信,在全剧队列里缓存。
代码片段:
YYCache *cache = [BaseController sharedCacheManager]; //返回一个static cache
NSMutableDictionary *userDataDic = [[NSMutableDictionary alloc]initWithDictionary:(NSDictionary *)[cache.diskCache objectForKey:account]];
xxxx操作xxxxx
[cache.diskCache setObject:userDataDic forKey:account];
这么做有问题吗?因为私信可能随时会有,有可能造成前一个私信缓存未完成,就来了有下一个需要缓存的私信。
The text was updated successfully, but these errors were encountered: