Added the API to remove failed URLs from black list, since now we populate the error code and user can know which URL get blocked
This commit is contained in:
parent
0dd1d42397
commit
0ba0aaca34
|
@ -261,6 +261,17 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
|
|||
*/
|
||||
- (void)cancelAll;
|
||||
|
||||
/**
|
||||
* Remove the specify URL from failed black list.
|
||||
* @param url The failed URL.
|
||||
*/
|
||||
- (void)removeFailedURL:(nonnull NSURL *)url;
|
||||
|
||||
/**
|
||||
* Remove all the URL from failed black list.
|
||||
*/
|
||||
- (void)removeAllFailedURLs;
|
||||
|
||||
/**
|
||||
* Return the cache key for a given URL, does not considerate transformer or thumbnail.
|
||||
* @note This method does not have context option, only use the url and manager level cacheKeyFilter to generate the cache key.
|
||||
|
|
|
@ -228,6 +228,21 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
return isRunning;
|
||||
}
|
||||
|
||||
- (void)removeFailedURL:(NSURL *)url {
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
SD_LOCK(self.failedURLsLock);
|
||||
[self.failedURLs removeObject:url];
|
||||
SD_UNLOCK(self.failedURLsLock);
|
||||
}
|
||||
|
||||
- (void)removeAllFailedURLs {
|
||||
SD_LOCK(self.failedURLsLock);
|
||||
[self.failedURLs removeAllObjects];
|
||||
SD_UNLOCK(self.failedURLsLock);
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
// Query normal cache process
|
||||
|
|
Loading…
Reference in New Issue