title: Data Replication from MySql to Redis Server
body: <p>I`m using RedisTemplate provided by spring framework for In-Memory caching. And MySql as primary database. I need to update the cache whenever new row is added or updated in primary database. 
  How can i accomplish this using java? 
  Is there any inbuilt feature provided by Redis server to achieve this?</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code>@Override public void getEmployeeDetailsForRedisTemplate(List&lt;Employee&gt; employee) { 
    logger.info("Saving " + employee.size() + " record to redis template"); 
    for (Employee emp : employee) { 
      listOperations.leftPush(EnumConstants.EMPLOYEE_KEY.getValue(), emp); 
    } 
  } 
  </code></pre>
  
  <p>I have been polling database in regular interval and based on status column in DB i was pushing updated data to redis server. Which is not a efficient way of doing it</p>