如何在 Grails 中启用缓存的情况下将不同的服务器同步到 GORM 层

How to sync different servers to GORM layer with cache enabled in Grails

我在三个不同的 tomcat 服务器上有三个 Grails 应用 运行 实例,它们共享相同的数据库 (Oracle)。我已经为我的一些域 类 启用了缓存:true.

如何在通过一台服务器更新数据库时同步所有服务器缓存。

How can I sync all of my server cache while updating DB via one server.

您需要一个共享的分布式缓存。 Ehcache 是一种选择 (https://grails-plugins.github.io/grails-cache-ehcache/)。