質問

JBossクラスタを設定しており、JBossキャッシュに基づいて構築された独自の分散キャッシュソリューションを構築しています(当社の場合はORMレイヤーに2番目のレベルのキャッシュとして使用できません)。無効化をキャッシュモードとして使用しないでください。私が(非常に)両方の解決策をテストすることができます(非常に)最小のテストが機能するように思われる限り、オブジェクトはキャッシュに入れられ、オブジェクトはどのサーバーで更新されたときにそれらが更新されたときにそれらが追い出されるように思われるようです。 これにより、AOP Instrumentationを使用したPojuacheを使用すると、オブジェクト全体ではなく更新されたフィールド値のみを複製できるようにするために、AOP Instrumentationを使用したPojocacheが必要とされると考えています。ここで修正していますか、それとも私たちのシナリオでTreeCacheの上にPojocacheを使って他の利点がありますか?Pojocacheに利点がある場合は、AOPの計装を必要とし、@Pojocashableを使用してエンティティに注釈を付けることができます(はい、JBCache 1.4.1を使用しています)。

について Jonas Heineson

役に立ちましたか?

解決

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