我们正在建立一个JBoss群集,我们正在构建构建在JBoss缓存时的自主缓存解决方案(不能在我们的情况下将其作为2nd级别缓存到ORM层)。我们希望使用Inventation并不复制为缓存模式。据我所知,(非常)少量测试,这两个解决方案似乎都在工作中,对象被放入缓存中,并且在任何服务器上更新时似乎都会被驱逐。 这使我相信只有在使用复制时才需要使用AOP仪器的POJocache,以便只能复制更新的字段值而不是整个对象。我在这里纠正,或者在我们的场景中使用Pojocache在TreeCache上使用Pojocache吗?如果Pojocache具有优势,我们仍然需要AOP仪器,并用@Pojocachable注释我们的实体(是的,我们使用的是jbcache 1.4.1),因为我们不使用相关性?

问候 乔纳斯海斯顿

有帮助吗?

解决方案

PoJoCache has the ability through AOP to:

  • only replicate changed fields and not whole objects. Makes a difference if e.g. your person object containes a huge image of the person and you only change the password
  • detect changes and thus can automatically put them on the list to be replicated.

TreeCache (plain) does not need AOP, but can thus not replicate individual fields or detect what has changed so that you need to trigger replication yourself.

If you don't replicate, those points are probably irrelevant.

IIrc, you don't need the @PojocaCacheable annotation for Pojo cache - without it, you need to specify the classes to be enhanced in a different way.

I have the feeling that if you are not replicating, the plain TreeCache will be enough.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top