From 0bd2d088902d22bad6dac4f4f15dfc56ac9c2b98 Mon Sep 17 00:00:00 2001 From: Marcel Reutegger Date: Wed, 19 Oct 2016 08:43:28 +0000 Subject: [PATCH] OAK-4900: Enable persistent caches by default Update documentation git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1765557 13f79535-47bb-0310-9956-ffa450edef68 --- .../markdown/nodestore/persistent-cache.md | 31 ++++++++++++------- oak-doc/src/site/markdown/osgi_config.md | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/oak-doc/src/site/markdown/nodestore/persistent-cache.md b/oak-doc/src/site/markdown/nodestore/persistent-cache.md index 0657d20640a..867feebc887 100644 --- a/oak-doc/src/site/markdown/nodestore/persistent-cache.md +++ b/oak-doc/src/site/markdown/nodestore/persistent-cache.md @@ -27,19 +27,17 @@ the load on the storage backend. ### OSGi Configuration -The OSGi configuration of the persistent cache is: +The default OSGi configuration of the persistent cache is: org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService - persistentCache=./cache + persistentCache=cache,binary=0 -This will enable the persistent cache, and set the configuration option to "./cache". - -### Configuration Options +### Configuration Options The persistent cache configuration setting is string with a number of comma separated elements. The first element is the directory where the cache is stored. Example: - ./cache + cache In this case, the data is stored in the directory "cache", relative to the `repository.home` directory. If no repository home directory is @@ -85,20 +83,29 @@ To disable this option, use "-compress". Those setting can be appended to the persistent cache configuration string. An example configuration is: - ./cache,size=2048,binary=0,-compact,-compress + cache,size=2048,binary=0,-compact,-compress + +To disable the persistent cache entirely, use the following configuration: + + org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService + persistentCache=- ### Journal cache -Diff cache entries can also be stored in a separate persistent cache and -configured independently if needed. This can be enabled in the OSGi +Since Oak 1.6. + +Diff cache entries can also are stored in a separate persistent cache and +configured independently if needed. This can be done in the OSGi configuration like in the following example: org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService - persistentCache=./cache,size=2048 - journalCache=./journal,size=1024 + persistentCache=cache,size=2048 + journalCache=diff-cache,size=1024 The configuration options are the same as for the `persistentCache`, but options -unrelated to the diff cache type are ignored. +unrelated to the diff cache type are ignored. The default configuration is +`journalCache=diff-cache` and can be disabled the same way as the +regular persistent cache with a dash: `journalCache=-`. ### Dependencies diff --git a/oak-doc/src/site/markdown/osgi_config.md b/oak-doc/src/site/markdown/osgi_config.md index 43dcefc316b..b1706fa3e3f 100644 --- a/oak-doc/src/site/markdown/osgi_config.md +++ b/oak-doc/src/site/markdown/osgi_config.md @@ -111,7 +111,7 @@ blobCacheSize `blobCacheSize`. persistentCache -: Default "" (an empty string, meaning disabled) +: Default "cache,binary=0" (prior to 1.6, the persistent cache was disabled by default) : The [persistent cache][persistent-cache], which is stored in the local file system.