mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-16 04:11:01 +00:00
only cache anchor urls with -a
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@809 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
21d8c11b28
commit
9676d14c89
1 changed files with 8 additions and 3 deletions
|
|
@ -172,7 +172,7 @@ class UrlData:
|
|||
self.url = urlparse.urljoin(self.baseRef, self.urlName)
|
||||
elif self.parentName:
|
||||
self.url = urlparse.urljoin(self.parentName, self.urlName)
|
||||
else:
|
||||
else:
|
||||
self.url = self.urlName
|
||||
# unquote url
|
||||
self.url = urllib.unquote(self.url)
|
||||
|
|
@ -308,9 +308,14 @@ class UrlData:
|
|||
|
||||
|
||||
def getCacheKey (self):
|
||||
# use that the host is lowercase
|
||||
# remember that the host is lowercase
|
||||
if self.urlparts:
|
||||
return urlparse.urlunsplit(self.urlparts)
|
||||
if self.config["anchors"]:
|
||||
# do not ignore anchor
|
||||
return urlparse.urlunsplit(self.urlparts)
|
||||
else:
|
||||
# remove anchor from cache key
|
||||
return urlparse.urlunsplit(self.urlparts[:4]+[''])
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue