openjpa.QueryCache default

In previous releases, the default value for the openjpa.QueryCache property was true when the openjpa.DataCache was enabled. Depending on application characteristics, this default QueryCache enablement actually could negate much of the potential gains achieved by using the DataCache. Thus, the default value for the openjpa.QueryCache property is now false.

To re-enable the default QueryCache behavior, you need to include the following property in your persistence.xml configuration.

    <property name="openjpa.QueryCache" value="true"/>

If your configuration had previously enabled the QueryCache explicitly, then you might have to include the true value into your configuration (if you relied on the previous default). Otherwise, your current QueryCache enablement will continue to work.

    <property name="openjpa.QueryCache" value="true(CacheSize=1000, SoftReferenceSize=100)"/>

Copyright © 2006-2026 The Apache Software Foundation. All Rights Reserved.