enormego / EGOCache

Fast Caching for Objective-C (iPhone & Mac Compatible)
MIT License
1.33k stars 290 forks source link

Cache verify #47

Open narlei opened 9 years ago

narlei commented 9 years ago

Hello,

In my project I add the block in - (UIImage)imageForKey:(NSString)key { : if (!image && pathImage){ @try { NSData data = [NSData dataWithContentsOfFile:pathImage]; image = [UIImage imageWithData:data]; } @catch (NSException e1) {

        }
    }

if not success "[NSKeyedUnarchiver unarchiveObjectWithFile:pathImage]", then verify if can transform the data file in UIImage;

It's working very fine.

Can you add this in the project? Because I'm using cocoaPods in my project.

Thank you! This Class is wonderful.

narlei commented 7 years ago

Created a pull request https://github.com/enormego/EGOCache/pull/59