You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jörn Gersdorf (JIRA)" <ji...@apache.org> on 2014/11/12 09:18:34 UTC
[jira] [Updated] (OPENJPA-2543) Add possibility to disable
QueryCache by default (new config property)
[ https://issues.apache.org/jira/browse/OPENJPA-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jörn Gersdorf updated OPENJPA-2543:
-----------------------------------
Description:
As discussed on the [openjpa-user MailingList|http://mail-archives.apache.org/mod_mbox/openjpa-users/201411.mbox/%3CCALLZsMnXPQT%2BeQB3VjYe4U05%2BgSR%2Bw37QqXGRdxdvM-kgEXdLw%40mail.gmail.com%3E] I need to enable the OpenJPA QueryCache in a selective way, i. e. it should be disabled unless I enable it explicitly using query.getFetchPlan().setQueryResult(true).
I´ve figured out that this requires {{FetchConfigurationImpl$ConfigurationState#queryCache}} to be set to false by default, however, there does not seem to be a configuration property for this.
So I propose a new configuration property like {{openjpa.jdbc.QueryCacheDefaultState}}, defaulting to {{true}} (the current default), with possibility to set to {{false}}. This would set the property {{FetchConfigurationImpl$ConfigurationState#queryCache}} accordingly.
As a workaround it is currently only possible to use a custom BrokerFactory to implement the required behaviour (see also OPENJPA-2542).
was:
As discussed on the [openjpa-user MailingList|http://mail-archives.apache.org/mod_mbox/openjpa-users/201411.mbox/%3CCALLZsMnXPQT%2BeQB3VjYe4U05%2BgSR%2Bw37QqXGRdxdvM-kgEXdLw%40mail.gmail.com%3E] I need to enable the OpenJPA QueryCache in a selective way, i. e. it should be disabled unless I enable it explicitly using query.getFetchPlan().setQueryResult(true).
I´ve figured out that this requires {{FetchConfigurationImpl$ConfigurationState#queryCache}} to be set to false by default, however, there does not seem to be a configuration property for this.
So I propose a new configuration property like {{openjpa.jdbc.QueryCacheDefaultState}}, defaulting to {{true}} (the current default), with possibility to set to {{false}}. This would set the property {{FetchConfigurationImpl$ConfigurationState#queryCache}} accordingly.
> Add possibility to disable QueryCache by default (new config property)
> ----------------------------------------------------------------------
>
> Key: OPENJPA-2543
> URL: https://issues.apache.org/jira/browse/OPENJPA-2543
> Project: OpenJPA
> Issue Type: Improvement
> Components: jdbc
> Affects Versions: 2.3.0
> Reporter: Jörn Gersdorf
>
> As discussed on the [openjpa-user MailingList|http://mail-archives.apache.org/mod_mbox/openjpa-users/201411.mbox/%3CCALLZsMnXPQT%2BeQB3VjYe4U05%2BgSR%2Bw37QqXGRdxdvM-kgEXdLw%40mail.gmail.com%3E] I need to enable the OpenJPA QueryCache in a selective way, i. e. it should be disabled unless I enable it explicitly using query.getFetchPlan().setQueryResult(true).
> I´ve figured out that this requires {{FetchConfigurationImpl$ConfigurationState#queryCache}} to be set to false by default, however, there does not seem to be a configuration property for this.
> So I propose a new configuration property like {{openjpa.jdbc.QueryCacheDefaultState}}, defaulting to {{true}} (the current default), with possibility to set to {{false}}. This would set the property {{FetchConfigurationImpl$ConfigurationState#queryCache}} accordingly.
> As a workaround it is currently only possible to use a custom BrokerFactory to implement the required behaviour (see also OPENJPA-2542).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)