title: Grails 3 session and distributed cache using redis
body: <p>I have been looking around for a way to achieve this and I have not found any authoritative answer making me wonder if this has stopped being the practice when running application on a cluster of 2 or more servers.</p>
  
  <p>I have grails 3.2.2 app that will run on aws. I am using simple form using default spring security plugin <code>compile 'org.grails.plugins:spring-security-core:3.1.1'</code></p>
  
  <p>I would love to be able to store session in redis for load balancing purpose. Using elastic cache service (redis) on aws.</p>
  
  <p>I would also love to use the same in replacement of ehcache.</p>
  
  <p>So far for session I got </p>
  
  <ul>
  <li><a href="https://github.com/jeetmp3/spring-session" rel="nofollow noreferrer">spring-session from jeetmp3</a> </li>
  <li><a href="https://github.com/rpalcolea/grails-redis-session/" rel="nofollow noreferrer">grails-redis-session from rpalcolea</a></li>
  </ul>
  
  <p>For caching I got</p>
  
  <ul>
  <li><a href="https://grails.org/plugin/redis" rel="nofollow noreferrer">org.grails.plugins:redis:1.6.6</a></li>
  <li><a href="http://grails.org/plugin/cache-redis" rel="nofollow noreferrer">org.grails.plugins:cache-redis:1.1.0</a></li>
  <li><a href="https://plugins.grails.org/plugin/cache" rel="nofollow noreferrer">org.grails.plugins:cache:3.0.3</a></li>
  </ul>
  
  <p>Looks like I am really lost on this. Don't know which one to one or which one to use together. I would be very much grateful if someone can point me to the right direction. Any recent documentation or tutorial is welcome.</p>
  
  <p>Best Regards,</p>