From e9d43e443a11b68fc0d09e7633674333bd88e760 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Thu, 8 Sep 2011 09:59:16 +0200 Subject: [PATCH] When storeImage:imageData:forKey:toDisk: is called with toDisk:YES but no data, do not prevent memory caching (fix: #24) --- SDImageCache.m | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/SDImageCache.m b/SDImageCache.m index 40b43ef7..9dacb505 100644 --- a/SDImageCache.m +++ b/SDImageCache.m @@ -188,15 +188,11 @@ static SDImageCache *instance; return; } - if (toDisk && !data) - { - return; - } - [memCache setObject:image forKey:key]; if (toDisk) { + if (!data) return; NSArray *keyWithData; if (data) {