문제

우리는 JBoss 클러스터를 설정하고 있으며 JBoss 캐시에 구축 된 자체 분산 캐시 솔루션을 구축하고 있습니다 (이를 위해 2 차 수준의 캐시로 사용할 수 없음).우리는 무효화를 사용하고 캐시 모드로 복제하지 않으려합니다.두 가지 솔루션이 모두 작동하는 것처럼 보이는 (매우) 볼 수있는 한, 객체가 캐시에 넣어졌으며 객체가 서버 중 하나에서 업데이트 될 때 삭제되는 것처럼 보입니다. 이는 AOP 계측을 사용하는 Pojocache가 복제를 사용하여 업데이트 된 필드 값 만 복제 할 수 있고 전체 객체가 아닌 경우에만 Pojocache가 필요하다고 생각합니다.우리 시나리오에서 TreeCache를 통해 PojoCache를 사용하는 다른 이점이있는 다른 이점이 있습니까?그리고 Pojocache가 이점을 가지고 있으면 AOP 계측이 필요한 경우 @pojocachacachable (예, 우리는 JBCache 1.4.1을 사용하고 있음)에 대한 엔티티를 @pojocachaceable (예, 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