Skip to content

Commit

Permalink
clear Cache Topic access
Browse files Browse the repository at this point in the history
  • Loading branch information
svuillet committed Nov 13, 2012
1 parent 7ec97a1 commit d20150a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/com/silverpeas/tags/navigation/KmeliaCaching.java
Expand Up @@ -76,9 +76,13 @@ private void manageCache() {
if (refreshDelay == null) refreshDelay = "3600";
if (cacheActivate == null) cacheActivate = "true";
if ((System.currentTimeMillis()-cacheAge >= Long.valueOf(refreshDelay)*1000) || cacheActivate.equals("false")) {
treeViewCache.clear();
topicCache.clear();
cacheAge = System.currentTimeMillis();
clearCache();
}
}

public void clearCache() {
treeViewCache.clear();
topicCache.clear();
cacheAge = System.currentTimeMillis();
}
}

0 comments on commit d20150a

Please sign in to comment.