Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,21 @@ https://www.hibernate.org/[Hibernate] features a second-level cache with a custo
hibernate:
cache:
use_second_level_cache: true
provider_class: net.sf.ehcache.hibernate.EhCacheProvider
region:
factory_class: org.hibernate.cache.ehcache.EhCacheRegionFactory
factory_class: 'jcache'
----

and the `ehcache` dependency using the `jakarta` classifier needs added to build.gradle:

[source,groovy]
----
dependencies {
implementation 'org.ehcache:ehcache', {
capabilities {
requireCapability('org.ehcache:ehcache-jakarta')
}
}
}
----

You can customize any of these settings, for example to use a distributed caching mechanism.
Expand Down
8 changes: 6 additions & 2 deletions grails-doc/src/en/guide/upgrading/upgrading60x.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,17 @@ You will need to change it to `jcache` and add the Ehcache dependency as follows
use_second_level_cache: true
use_query_cache: false
region:
factory_class: 'jcache'
factory_class: 'jcache'
----

[source,groovy]
.build.gradle
----
implementation 'org.ehcache:ehcache'
implementation 'org.ehcache:ehcache', {
capabilities {
requireCapability('org.ehcache:ehcache-jakarta')
}
}
----

Alternatively, you can define the hibernate-ehcache dependency explicitly and adjust it to exclude `hibernate-core` and add the `jboss-transaction-api_1.3_spec` see link:upgrading.html#_12_5_hibernate_ehcache[Hibernate-ehcache]
Expand Down
Loading