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

Determine proper configuration of SQL caches

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.0
    • None
    • jdbc, query, sql
    • None

    Description

      With the introduction of the openjpa.jdbc.CachesSelect (openjpa-2099) property, we now have three configuration properties that relate to the caching of the generated SQL. These properties are not consistent with their default values, the documentation, and configuration. We should make these consistent.

      The three properties are:

      openjpa.jdbc.QuerySQLCache - SQL generated from JPQL cache
      openjpa.jdbc.FinderCache - FindBy SQL cache
      openjpa.jdbc.CachesSelect (openjpa-2099) - SQL used for collection loading cache

      The default values for QuerySQLCache and FinderCache are true, while the default value for the CachesSelect is false.

      QuerySQLCache and (eventually) CachesSelect are documented. FinderCache is not documented.

      As far as I can tell, QuerySQLCache and CachesSelect are actively being checked for and utilized in conditionals – that is, the setting of these properties affect the caching of the generated SQL. I can't find the same processing for FinderCache.

      Even the names of these caching properties are not consistent. At a minimum, it would be nice to re-name CachesSelect to something like CollectionSQLCache. An even more radical approach would be to combine the setting of these caches into a single property with multiple attributes. Something like:

      openjpa.jdbc.PreparedSQLCache (querySQLCache = true|false, finderCache = true|false, CollectionSQLCache = true|false, <any other necessary attributes>)

      Just an idea. Bottom line is to get these generated sql caches consistent from a configuration, usage, and documentation viewpoint.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kwsutter Kevin W. Sutter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: