Table A.2. Cache Properties
Property | Example | Purpose |
---|---|---|
hibernate.cache.provider_class | Fully-qualified classname | The classname of a custom CacheProvider. |
hibernate.cache.use_minimal_puts |
| Optimizes second-level cache operation to minimize writes, at the cost of more frequent reads. This is most useful for clustered caches and is enabled by default for clustered cache implementations. |
hibernate.cache.use_query_cache |
| Enables the query cache. You still need to set individual queries to be cachable. |
hibernate.cache.use_second_level_cache |
| Completely disable the second level cache, which is enabled by default for classes which specify a <cache> mapping. |
hibernate.cache.query_cache_factory | Fully-qualified classname | A custom QueryCache interface. The default is the built-in StandardQueryCache . |
hibernate.cache.region_prefix | A string | A prefix for second-level cache region names. |
hibernate.cache.use_structured_entries |
| Forces Hibernate to store data in the second-level cache in a more human-readable format. |
hibernate.cache.auto_evict_collection_cache |
| Enables the automatic eviction of a bi-directional association's collection cache when an element in the ManyToOne collection is added/updated/removed without properly managing the change on the OneToMany side. |
hibernate.cache.use_reference_entries |
| Optimizes second-level cache operation to store immutable entities (aka "reference") which do not have associations into cache directly, this case, lots of disasseble and deep copy operations can be avoid. Default value of this property is false . |