Document `hibernate.cache.keys_factory`
(cherry picked from commit 789724f4e4
)
This commit is contained in:
parent
b8498af6d1
commit
18b44d977e
|
@ -64,6 +64,16 @@ Besides specific provider configuration, there are a number of configurations op
|
|||
the alternative is to have stale data in that collection cache.
|
||||
`hibernate.cache.use_reference_entries`::
|
||||
Enable direct storage of entity references into the second level cache for read-only or immutable entities.
|
||||
`hibernate.cache.keys_factory`::
|
||||
When storing entries into second-level cache as key-value pair, the identifiers can be wrapped into tuples
|
||||
<entity type, tenant, identifier> to guarantee uniqueness in case that second-level cache stores all entities
|
||||
in single space. These tuples are then used as keys in the cache. When the second-level cache implementation
|
||||
(incl. its configuration) guarantees that different entity types are stored separately and multi-tenancy is not
|
||||
used, you can omit this wrapping to achieve better performance. This hint can be ignored by the second-level
|
||||
cache implementation, though. Valid values are:
|
||||
* `default` (wraps identitifers in the tuple)
|
||||
* `simple` (uses identifiers as keys without any wrapping)
|
||||
* fully qualified class name that implements `org.hibernate.cache.spi.CacheKeysFactory`
|
||||
|
||||
[[caching-mappings]]
|
||||
=== Configuring second-level cache mappings
|
||||
|
|
|
@ -682,6 +682,8 @@ public interface AvailableSettings {
|
|||
* <li>an Object implementing {@link org.hibernate.cache.spi.CacheKeysFactory}</li>
|
||||
* <li>a Class implementing {@link org.hibernate.cache.spi.CacheKeysFactory}</li>
|
||||
* <li>FQN of a Class implementing {@link org.hibernate.cache.spi.CacheKeysFactory}</li>
|
||||
* <li>'default' as a short name for {@link org.hibernate.cache.internal.DefaultCacheKeysFactory}</li>
|
||||
* <li>'simple' as a short name for {@link org.hibernate.cache.internal.SimpleCacheKeysFactory}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since 5.0.10 - note that currently this is only honored for hibernate-infinispan
|
||||
|
|
Loading…
Reference in New Issue