add maxSize parameter to HotEntryCache
This commit is contained in:
@@ -73,7 +73,7 @@ public class DataStore implements AutoCloseable {
|
||||
|
||||
// A Doc will never be changed once it is created. Therefore we can cache them
|
||||
// easily.
|
||||
private final HotEntryCache<Long, Doc> docIdToDocCache = new HotEntryCache<>(Duration.ofMinutes(30)/* , 100_000 */);
|
||||
private final HotEntryCache<Long, Doc> docIdToDocCache = new HotEntryCache<>(Duration.ofMinutes(30), 100_000);
|
||||
|
||||
private final HotEntryCache<Tags, PdbWriter> writerCache;
|
||||
|
||||
@@ -102,7 +102,7 @@ public class DataStore implements AutoCloseable {
|
||||
|
||||
queryCompletionIndex = new QueryCompletionIndex(storageBasePath);
|
||||
|
||||
writerCache = new HotEntryCache<>(Duration.ofSeconds(10)/* , 1000 */);
|
||||
writerCache = new HotEntryCache<>(Duration.ofSeconds(10), 1000);
|
||||
writerCache.addListener((key, value) -> value.close());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user