Java Caching Solutions
Bu yüzden son yıllarda  Second Level Caching uygulamalarda çok kullanılan ve aranılan bir özellik olmaya  başladı. Bu yüzden Hibernate gibi populer  O/R Mapping araçları Second Level  Caching'i default olarak destekliyor. Eğer zaten Hibernate kullanıyorsanız  sadece düşünmeniz gereken Hibernate'in altında hangi Cache implemantasyonunu  kullanacağınıza karar vermeniz. Hibernate bu konuda oldukça  esnek.
Eğer Hibernate  kullanmıyorsanız dahi mevcut POJO aracınıza kendiniz de bir Second Level Cache  tool'u entegre edebilirsiniz. Bu konuda en yaygın kullanılan 4 Cache Tool'u  mevcut.
1)        JBossCache : Cache araçları  içindeki en yetenekli olanı. En önemli özelliği cluster (senkron/asenkron)  desteğinin olması ve transactional çalışması. Cluster nodları arasındaki  iletişim için JGroups kullandığı için oldukça performanslı.  Cache datası konfigürasyonunuza göre memory'de veya disk'te saklanabiliyor.  Uygulamanız cluster bir mimari üzerinde ise ve transaction bütünlüğü çok  önemliyse JBossCache'ten şaşmayın. JBoss Application Server altyapısında da  kullanıldığı için güvenilirliği oldukça yüksek.
2)        EHCache : Cache araçları içerisindeki en  hızlı ve en kolay uygulanabilir olanı. EHCache'in de memory ve disk tabanlı  caching desteği mevcut.  EHCache  bir çok open-source ve lisanlı uygulama tarafından  kullanılmakta.  EHCache'in de  cluster desteği mevcut. 
3)        OSCache : Quartz, Webwork(Strus  ile birleşti yakın zamanda), XWork, SiteMesh, OSWorkflow gibi meşhur open-source  toolları geliştiren www.opensyphony.com topluluğu tarafından  geliştirildi. JBossCache kadar yetenekli olmasa da cluster (OSCache de JGroups  kullanıyor) desteği mevcut. OSCache de gayet başarılı ve çok tutulan bir Cache  çözümü. 
4)        SwarmCache : Basit, hızlı ama  cluster desteği olan diğer güzel bir caching tool?u. SwarmCache de altyapısında  JGroups  kullanıyor.
Caching  Strategies
 - Read-only:  This strategy is useful for data that is read frequently but never updated. This  is by far the simplest and best-performing cache  strategy.
- Read/write:  Read/write caches may be appropriate if your data needs to be updated. They  carry more overhead than read-only caches. In non-JTA environments, each  transaction should be completed when Session.close() or Session.disconnect() is  called.
- Nonstrict  read/write: This strategy does not guarantee that two transactions won't  simultaneously modify the same data. Therefore, it may be most appropriate for  data that is read often but only occasionally modified.
- Transactional: This is a fully  transactional cache that may be used only in a JTA  environment.
Support for these strategies is not  identical for every cache implementation. Table 1 shows the options available  for the different cache implementations. 
| Cache | Read-only | Nonstrict  Read/write | Read/write | Transactional | 
| EHCache | Yes | Yes | Yes | No | 
| OSCache | Yes | Yes | Yes | No | 
| SwarmCache | Yes | Yes | No | No | 
| JBoss  TreeCache | Yes | No | No | Yes | 



