title: Cache (potentially) changing values from the database in java
body: <p>What is the current recommended approach for storing cached data in Java</p>
  
  <p>I am looking for a particular approach that will update the cache when an insert or an update happens to particular table(s).</p>
  
  <p>Ideally this should happen as quickly as possible so as to avoid any issues when cross referencing data.</p>
  
  <p>Is there a technology that provides this (such as ehcache) or an advised programming standard which i could follow.</p>
  
  <p>Thanks</p>