ソースを参照

Remove setter for defaultURLCache

Henddher Pedroza 8 年 前
コミット
f6f64c83b3

+ 0 - 5
UIKit+AFNetworking/AFImageDownloader.h

@@ -81,11 +81,6 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
  */
 + (NSURLCache *)defaultURLCache;
 
-/**
- Sets the default `NSURLCache`
- */
-+ (void) setDefaultURLCache:(NSURLCache *)defaultCache;
-
 /**
  The default `NSURLSessionConfiguration` with common usage parameter values.
  */

+ 0 - 11
UIKit+AFNetworking/AFImageDownloader.m

@@ -106,16 +106,10 @@
 
 @end
 
-static NSURLCache* _defaultURLCache = nil;
-
 @implementation AFImageDownloader
 
 + (NSURLCache *)defaultURLCache {
     
-    if (_defaultURLCache) {
-        return _defaultURLCache;
-    }
-    
     // It's been discovered that a crash will occur on certain versions
     // of iOS if you customize the cache.
     //
@@ -131,11 +125,6 @@ static NSURLCache* _defaultURLCache = nil;
                                              diskPath:@"com.alamofire.imagedownloader"];
 }
 
-+ (void)setDefaultURLCache:(NSURLCache *)defaultCache {
-    
-    _defaultURLCache = defaultCache;
-}
-
 + (NSURLSessionConfiguration *)defaultURLSessionConfiguration {
     NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];