mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-14 11:21:02 +00:00
remove anchors from cache keys
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1722 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
26b3f1bcf3
commit
bf4309220e
1 changed files with 3 additions and 9 deletions
|
|
@ -103,15 +103,9 @@ class FileUrl (urlbase.UrlBase):
|
|||
def set_cache_keys (self):
|
||||
"""Set keys for URL checking and content recursion."""
|
||||
# removed anchor from content cache key
|
||||
self.cache_content_key = self.url
|
||||
# construct cache key
|
||||
if self.consumer.config["anchorcaching"]:
|
||||
# do not ignore anchor
|
||||
self.cache_url_key = \
|
||||
urlparse.urlunsplit(self.urlparts[:4]+[self.anchor])
|
||||
else:
|
||||
# no anchor caching
|
||||
self.cache_url_key = self.url
|
||||
self.cache_content_key = urlparse.urlunsplit(self.urlparts[:4]+[''])
|
||||
# do not ignore anchor
|
||||
self.cache_url_key = self.cache_content_key
|
||||
|
||||
def is_html (self):
|
||||
if linkcheck.checker.extensions['html'].search(self.url):
|
||||
|
|
|
|||
Loading…
Reference in a new issue