用于iOS和OS X的内存LRU缓存实现。
pod 'NMLRUCache'
并运行pod install
NMLRUCache/
复制到您的项目中 NMLRUCache *imageCache = [NMLRUCache sharedCache];
[NMLRUCache sharedCache].threshHold = 20;
[imageCache setImage:image forKey:@"imageKey"];
[imageCache imageForKey:@"imageKey"];