Skip to content

Commit

Permalink
invalidate single cache file
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed Dec 10, 2020
1 parent 6c1a6e9 commit 58b7bd9
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,15 @@ protected void doRun() {
}
});
if (cacheFilesToEvict.isEmpty() == false) {
cacheFilesToEvict.forEach(cache::invalidate);
for (Map.Entry<CacheKey, CacheFile> cacheFile : cacheFilesToEvict.entrySet()) {
try {
cache.invalidate(cacheFile.getKey(), cacheFile.getValue());
} catch (Exception e) {
assert e instanceof IOException : e;
logger.warn(() -> new ParameterizedMessage("failed to evict cache file {}", cacheFile.getKey()), e);
}

}
}
});
}
Expand Down

0 comments on commit 58b7bd9

Please sign in to comment.