Skip to content

Commit

Permalink
Document more Hibernate configuration properties
Browse files Browse the repository at this point in the history
  • Loading branch information
candrews authored Feb 23, 2017
1 parent 1dd76de commit 6b84aa9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Quick Start
</dependency>
```
* In application.properties, add:
`spring.jpa.properties.hibernate.cache.region.factory_class=com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactory`
* `spring.jpa.properties.hibernate.cache.region.factory_class=com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactory`
* To enable the query cache, add:
`spring.jpa.properties.hibernate.cache.use_query_cache=true` See the [Hibernate query caching documentation](https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#caching-query) for more information.
* To enable the second level cache, add:
`spring.jpa.properties.hibernate.cache.use_second_level_cache=true
spring.jpa.properties.javax.persistence.sharedCache.mode=ENABLE_SELECTIVE` See the [Hibernate query caching documentation](https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#caching-config) for more information.
* If using Spring Boot, that's it - `com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryAutoConfigure` will take care of the rest.
* If not not using Spring boot, the `com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryBeanPostProcessor` bean post processor must be registered (add it as a bean using Spring Java or XML configuration).

0 comments on commit 6b84aa9

Please sign in to comment.