Skip to content

Commit

Permalink
clear caches after changing blacklists, closes http://forum.yacy-webs…
Browse files Browse the repository at this point in the history
  • Loading branch information
fuchsi committed Sep 10, 2007
1 parent 5b0c144 commit 6601e37
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/de/anomic/plasma/urlPattern/abstractURLPattern.java
Expand Up @@ -118,10 +118,14 @@ protected Set getCacheUrlHashsSet(String blacklistType) {
}

public void clear() {
Iterator iter = this.hostpaths.keySet().iterator();
Iterator iter = this.hostpaths.values().iterator();
Iterator cIter = this.cachedUrlHashs.values().iterator();
while (iter.hasNext()) {
HashMap blacklistMap = (HashMap) this.hostpaths.get(iter.next());
blacklistMap.clear();
((HashMap) iter.next()).clear();
}
while (cIter.hasNext()) {
// clear caches as well to avoid wrong/outdated matches after changing lists
((Set) cIter.next()).clear();
}
}

Expand Down

0 comments on commit 6601e37

Please sign in to comment.