You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub


Conventions give you the ability to customize the Client API behavior. They are accessible from DocumentStore object:

try (IDocumentStore store = new DocumentStore()) {
    DocumentConventions conventions = store.getConventions();
    // customizations go here


You will find many settings to overwrite, allowing you to adjust the client according to your needs. The conventions apply to many different client behaviors. Some of them are grouped and described in the separate articles of this section.


All customizations need to be set before DocumentStore.initialize() is called.


If you need to modify the maximum http cache size, you can use the following setting:

conventions.setMaxHttpCacheSize(256 * 1024 * 1024);

Default size

The default value of this setting is configured to 128 MB.

The cache is created per database you use.

Disable caching

To disable the caching globally you can set the maxHttpCacheSize value to zero:


In this scenario, all the requests will be sent to the server to fetch the data.


Gets or sets maximum number of GET requests per session. Default: 30.



Controls whether optimistic concurrency is set to true by default for all future sessions. Default: false.



Forces you to disable updates of database topology. Default: false.



It determines if Java Enum types should be saved as integers or strings. Default: false.



It determines if the client will send headers to the server indicating that it allows compression to be used. Default: true.


Changing fields/properties naming convention

By default whatever casing convention you use in your entities' fields will be reflected server-side.

If following language-specific field casing conventions RavenDB clients use different field/properties naming conventions:

Language Default convention Example
C# PascalCase OrderLines
Java camelCase orderLines
JavaScript camelCase orderLines

This can be configured to allow inter-language operability e.g. store data PascalCase, but keep fields in the application code camelCase.

Using PascalCase in Java client

You have to set property naming strategy:

        new JsonExtensions.DotNetNamingStrategy());