사용자 도구

사이트 도구


java:ehcache

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
java:ehcache [2014/09/30 13:33]
kwon37xi
java:ehcache [2014/09/30 13:43]
kwon37xi [Replication과 Hibernate]
줄 2: 줄 2:
 ===== Singleton Cache ===== ===== Singleton Cache =====
   * 단일 JVM에서는 가능하면 Singleton ''CacheManager'' 인스턴스를 만들도록 하자.   * 단일 JVM에서는 가능하면 Singleton ''CacheManager'' 인스턴스를 만들도록 하자.
 +    * Hibernate와 Spring에서 Singleton Cache Manager를 사용하도록 하고 로딩 순서를 보정해주면 될 듯 하다.
   * [[http://techblog.bozho.net/?p=1080|Bozho's tech blog » Be Careful With (EhCache) Cache Managers]]   * [[http://techblog.bozho.net/?p=1080|Bozho's tech blog » Be Careful With (EhCache) Cache Managers]]
 +  * [[http://www.codingpedia.org/ama/spring-caching-with-ehcache/|Spring caching with Ehcache]]
 ===== Distributed Cache ===== ===== Distributed Cache =====
 The data is held in a Terracotta Server Array with a subset of recently used data held in each application cache node. The distributed topology, available with BigMemory Max, supports a very rich set of consistency modes. The data is held in a Terracotta Server Array with a subset of recently used data held in each application cache node. The distributed topology, available with BigMemory Max, supports a very rich set of consistency modes.
줄 23: 줄 24:
     * [[http://stackoverflow.com/questions/7099133/does-ehcache-respect-serialversionuid|java - Does ehcache respect serialVersionUID? - Stack Overflow]]     * [[http://stackoverflow.com/questions/7099133/does-ehcache-respect-serialversionuid|java - Does ehcache respect serialVersionUID? - Stack Overflow]]
     * [[http://forums.terracotta.org/forums/posts/list/5844.page|Clustered cache and serialVersionUID]]     * [[http://forums.terracotta.org/forums/posts/list/5844.page|Clustered cache and serialVersionUID]]
 +
 +==== Replication과 Hibernate ====
 +  * [[http://infinispan.org/docs/6.0.x/user_guide/user_guide.html#_using_infinispan_as_jpa_hibernate_second_level_cache_provider|Infinispan 매뉴얼의 Hibernate 관련 절을 보면 Hibernate의 캐시 전략이 나옴]] -> 좀 더 자세히 읽어볼 것.
 +  * 기본적으로 Replication으로 한다.
 +  * Entity와 컬렉션은 ''replicatePuts=false'', ''replicateUpdatesViaCopy=false''를 통해 네트워크 부하를 낮춘다. 이는 또한 여러 서버의 순차 배포시에 Class 버전이 서로 안 맞는 상황에서 직렬화 오류나는 것을 방어해준다. 비동기로 한다.
 +  * ''org.hibernate.cache.internal.StandardQueryCache'', ''org.hibernate.cache.spi.UpdateTimestampsCache''는 ''replicatePuts=true'', ''replicateUpdatesViaCopy=true'' 및 동기방식을 통해 모든 서버가 일관성있고 동일한 값을 유지하게 한다.
  
 ===== Update Check 끄기 ===== ===== Update Check 끄기 =====
java/ehcache.txt · 마지막으로 수정됨: 2022/02/11 13:53 저자 kwon37xi