mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-10 17:40:58 +00:00
add aliases to cache
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2457 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
e24c38c2aa
commit
26e52022ea
1 changed files with 8 additions and 1 deletions
|
|
@ -188,11 +188,18 @@ class Cache (linkcheck.lock.AssertLock):
|
|||
try:
|
||||
data = url_data.get_cache_data()
|
||||
key = url_data.cache_url_key
|
||||
assert key not in self.checked, key+u", "+unicode(self.checked[key])
|
||||
linkcheck.log.debug(linkcheck.LOG_CACHE, "Cache key %r...", key)
|
||||
assert key not in self.checked, \
|
||||
key + u", " + unicode(self.checked[key])
|
||||
assert key in self.in_progress, key
|
||||
# move entry from self.in_progress to self.checked
|
||||
del self.in_progress[key]
|
||||
self.checked[key] = data
|
||||
# add all aliases also to checked cache to avoid recursion
|
||||
for key in url_data.aliases:
|
||||
linkcheck.log.debug(linkcheck.LOG_CACHE,
|
||||
"Cache alias %r...", key)
|
||||
self.checked[key] = data
|
||||
finally:
|
||||
self.release()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue