fix #750 invalidate cache after updating suggest

This commit is contained in:
Shinsuke Sugaya 2016-10-20 16:16:34 +09:00
parent 7a06ce358e
commit b02c782af1
2 changed files with 5 additions and 0 deletions

View file

@ -89,6 +89,10 @@ public class PopularWordHelper {
return Collections.emptyList();
}
public void clearCache() {
cache.invalidateAll();
}
protected String getCacheKey(final String seed, final String[] tags, final String[] roles, final String[] fields,
final String[] excludes) {
final StringBuilder buf = new StringBuilder(100);

View file

@ -243,6 +243,7 @@ public class SuggestJob {
if (exitValue != 0) {
throw new FessSystemException("Exit Code: " + exitValue + "\nOutput:\n" + it.getOutput());
}
ComponentUtil.getPopularWordHelper().clearCache();
} catch (final FessSystemException e) {
throw e;
} catch (final InterruptedException e) {