From 9eff469cb65be5814cd5043303228999f738c9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Tue, 23 Apr 2013 09:36:07 +0200 Subject: [PATCH] Make SDWebImageManager cache creation extensible --- SDWebImage/SDWebImageManager.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index c7fee6a2..8f251261 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -39,7 +39,7 @@ { if ((self = [super init])) { - _imageCache = [SDImageCache sharedImageCache]; + _imageCache = [self createCache]; _imageDownloader = SDWebImageDownloader.new; _failedURLs = NSMutableArray.new; _runningOperations = NSMutableArray.new; @@ -47,6 +47,10 @@ return self; } +- (SDImageCache *)createCache +{ + return [SDImageCache sharedImageCache]; +} - (NSString *)cacheKeyForURL:(NSURL *)url {