...
|
...
|
@@ -84,6 +84,11 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { |
|
|
}
|
|
|
|
|
|
- (id)initWithNamespace:(NSString *)ns {
|
|
|
NSString *path = [self makeDiskCachePath:ns];
|
|
|
return [self initWithNamespace:ns diskCacheDirectory:path];
|
|
|
}
|
|
|
|
|
|
- (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory {
|
|
|
if ((self = [super init])) {
|
|
|
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];
|
|
|
|
...
|
...
|
@@ -101,7 +106,12 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { |
|
|
_memCache.name = fullNamespace;
|
|
|
|
|
|
// Init the disk cache
|
|
|
_diskCachePath = [self makeDiskCachePath:fullNamespace];
|
|
|
if (directory != nil) {
|
|
|
_diskCachePath = [directory stringByAppendingPathComponent:fullNamespace];
|
|
|
} else {
|
|
|
NSString *path = [self makeDiskCachePath:ns];
|
|
|
_diskCachePath = path;
|
|
|
}
|
|
|
|
|
|
// Set decompression to YES
|
|
|
_shouldDecompressImages = YES;
|
...
|
...
|
|