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
- is related to
-
OPENJPA-2099 Reuse relationship selection
- Reopened
-
OPENJPA-407 Cache SQL (or closer precursors to SQL) more aggressively
- Closed
-
OPENJPA-703 Cache ResultObjectProvider data to improve query performance
- Closed