Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2543

Add possibility to disable QueryCache by default (new config property)

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: jdbc
    • Labels:
      None

      Description

      As discussed on the openjpa-user MailingList 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).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                j0xaf Jörn Gersdorf
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: