Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCache.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCache.java (revision 1676414) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCache.java (working copy) @@ -51,7 +51,7 @@ private boolean cacheDiff = true; private boolean cacheDocs; private boolean cacheDocChildren; - private boolean compactOnClose = true; + private boolean compactOnClose = false; private boolean compress = true; private ArrayList caches = new ArrayList(); @@ -87,6 +87,8 @@ cacheDocChildren = true; } else if (p.equals("-compact")) { compactOnClose = false; + } else if (p.equals("+compact")) { + compactOnClose = true; } else if (p.equals("-compress")) { compress = false; } else if (p.endsWith("time")) { Index: oak-doc/src/site/markdown/nodestore/persistent-cache.md =================================================================== --- oak-doc/src/site/markdown/nodestore/persistent-cache.md (revision 1676414) +++ oak-doc/src/site/markdown/nodestore/persistent-cache.md (working copy) @@ -70,10 +70,10 @@ * Diff caching. By default, the list of differences between two revisions is cached. To disable this option, use "-diff". -* Compaction. By default, when a cache file is closed, -it is compacted and compressed (at a rate of around 100 MB per second). +* Compaction. The cache file can be compacted and compressed (at a rate of +around 100 MB per second) when it is closed. That way, the disk space is used more efficiently. -To disable this option, use "-compact". +To enable this option, use "+compact". * Compression. By default, the cache is compressed, saving space. To disable this option, use "-compress".