New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config AFImageDownloader NSURLCache and ask AFImageRequestCache implementer if an image should be cached #4010

Merged
merged 9 commits into from Dec 15, 2017

Remove setter for defaultURLCache

  • Loading branch information...
wjehenddher committed Jul 28, 2017
commit f6f64c83b35fed51633327ef15ad0dfc391dae8b
@@ -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.
*/
@@ -106,16 +106,10 @@ @interface AFImageDownloader ()
@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 @@ + (NSURLCache *)defaultURLCache {
diskPath:@"com.alamofire.imagedownloader"];
}
+ (void)setDefaultURLCache:(NSURLCache *)defaultCache {
_defaultURLCache = defaultCache;
}
+ (NSURLSessionConfiguration *)defaultURLSessionConfiguration {
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
ProTip! Use n and p to navigate between commits in a pull request.