This commit is contained in:
parent
d8dc6a25aa
commit
1bf62d475a
|
|
@ -54,10 +54,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)cacheKeyForURL:(NSURL *)url {
|
- (NSString *)cacheKeyForURL:(NSURL *)url {
|
||||||
|
if (!url) {
|
||||||
|
return @"";
|
||||||
|
}
|
||||||
|
|
||||||
if (self.cacheKeyFilter) {
|
if (self.cacheKeyFilter) {
|
||||||
return self.cacheKeyFilter(url);
|
return self.cacheKeyFilter(url);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (NSClassFromString(@"NSURLComponents") && [NSURLComponents instancesRespondToSelector:@selector(string)]) {
|
if (NSClassFromString(@"NSURLComponents") && [NSURLComponents instancesRespondToSelector:@selector(string)]) {
|
||||||
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
|
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
|
||||||
urlComponents.query = nil; // Strip out query parameters.
|
urlComponents.query = nil; // Strip out query parameters.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue