jdaugherty commented on issue #15531: URL: https://github.com/apache/grails-core/issues/15531#issuecomment-4151001714
There is a note about hibernate ehcache in the [documentation](https://grails.apache.org/docs/latest/guide/upgrading.html#_12_5_hibernate_ehcache) and the required [configuration](https://grails.apache.org/docs/latest/guide/upgrading.html#_12_19_hibernate_cache_region_factory_class). At a high level, ehcache is moving away from it's specific API to using the JCache API. Ehcache is simply an implementation of the JCache API. Looking at my local project, here's what I did to enable the cache though: 1. use ehcache & hibernate-jcache: runtimeOnly "org.hibernate:hibernate-jcache:5.6.15.Final", { exclude group: 'org.hibernate', module: 'hibernate-core' } api 'org.ehcache:ehcache', { capabilities { requireCapability('org.ehcache:ehcache-jakarta') } } Note: earlier versions of spring security required excluding the wrong version of ehcache. The latest versions no longer have this problem 2. be sure to configure cache in `hibernate` config path: hibernate.cache.region.factory_class = 'jcache' hibernate.javax.cache.uri = 'classpath://grails-ehcache.xml' hibernate.javax.cache.missing_cache_strategy = 'create' 3. Note: in my case, we extend the JCacheCacheManager and initialize it as a bean like so: grailsCacheManager(MyCacheManager, Caching.cachingProvider.getCacheManager( new ClassPathResource("grails-ehcache.xml").getURI(), Caching.cachingProvider.defaultClassLoader )) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
