Skip to content

Commit

Permalink
Add a default cache of 100Mb to LevelDB storage
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Apr 27, 2018
1 parent cd0778c commit 0376742
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public LevelDbStorage(Class<? extends T> typeParameterClass, Path path) {
this.typeParameterClass = typeParameterClass;
final Options options = new Options();
options.createIfMissing(true);
options.cacheSize(100 * 1048576); // 100MB cache
try {
db = Optional.of(JniDBFactory.factory.open(path.toFile(), options));
} catch (final IOException e) {
Expand Down

0 comments on commit 0376742

Please sign in to comment.