Skip to content
Browse files

Use imageWithContentsOfFile: instead of going through dataForKey:, in…

… case UIImage has some optimizations (like reading data sequentially instead of all at once).
  • Loading branch information...
1 parent bb91749 commit 8b7c7ecfc8fad396b6547ad3fef085713644f794 @adamjernst adamjernst committed Apr 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 EGOCache.m
View
2 EGOCache.m
@@ -221,7 +221,7 @@ - (void)setString:(NSString*)aString forKey:(NSString*)key withTimeoutInterval:(
#if TARGET_OS_IPHONE
- (UIImage*)imageForKey:(NSString*)key {
- return [UIImage imageWithData:[self dataForKey:key]];
+ return [UIImage imageWithContentsOfFile:cachePathForKey(key)];
}
- (void)setImage:(UIImage*)anImage forKey:(NSString*)key {

0 comments on commit 8b7c7ec

Please sign in to comment.
Something went wrong with that request. Please try again.