Grails3.3 二级缓存

1、引入依赖

compile "org.hibernate:hibernate-ehcache"

2、application.yml增加配置

hibernate:
    cache:
        queries: false
        use_second_level_cache: true
        use_query_cache: false
        region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory

参考

发布了72 篇原创文章 · 获赞 38 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/qq_16165281/article/details/91881466