Skip to content

Commit

Permalink
OAK-4900: Enable persistent caches by default
Browse files Browse the repository at this point in the history
Update documentation

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1765557 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mreutegg committed Oct 19, 2016
1 parent 8c8ff65 commit 0bd2d08
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
31 changes: 19 additions & 12 deletions oak-doc/src/site/markdown/nodestore/persistent-cache.md
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion oak-doc/src/site/markdown/osgi_config.md
Expand Up @@ -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.

<a name="cache-allocation"></a>
Expand Down

0 comments on commit 0bd2d08

Please sign in to comment.