Fixed styling to match rs/SDWebImage repo
This commit is contained in:
parent
547345c7f5
commit
8a2ae7e547
|
|
@ -62,7 +62,8 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
|||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
_diskCachePath = [paths[0] stringByAppendingPathComponent:fullNamespace];
|
||||
|
||||
dispatch_sync(_ioQueue, ^{
|
||||
dispatch_sync(_ioQueue, ^
|
||||
{
|
||||
_fileManager = NSFileManager.new;
|
||||
});
|
||||
|
||||
|
|
@ -190,10 +191,11 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
|||
[self storeImage:image imageData:nil forKey:key toDisk:toDisk];
|
||||
}
|
||||
|
||||
- (BOOL)diskImageExistsWithKey:(NSString *)key {
|
||||
|
||||
- (BOOL)diskImageExistsWithKey:(NSString *)key
|
||||
{
|
||||
__block BOOL exists = NO;
|
||||
dispatch_sync(_ioQueue, ^{
|
||||
dispatch_sync(_ioQueue, ^
|
||||
{
|
||||
exists = [_fileManager fileExistsAtPath:[self defaultCachePathForKey:key]];
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (BOOL)diskImageExistsForURL:(NSURL *)url {
|
||||
- (BOOL)diskImageExistsForURL:(NSURL *)url
|
||||
{
|
||||
NSString *key = [self cacheKeyForURL:url];
|
||||
return [self.imageCache diskImageExistsWithKey:key];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue