title: How to use Redis with Play 2.3.7
body: <p>I've just enabled <code>Redis</code> by following <a href="https://github.com/typesafehub/play-plugins/tree/master/redis" rel="nofollow">the official guidelines</a>. Everything compiles fine and <code>Redis</code> is loaded when the application first starts:</p>
  
  <pre><code>[info] application - Redis Plugin enabled. Connecting to Redis on localhost:6379 to 0 with timeout 2000.
  [info] application - Redis Plugin pool configuration: redis.clients.jedis.JedisPoolConfig@287ab5fe[maxTotal=8,maxIdle=8,minIdle=0,lifo=true,maxWaitMillis=-1,minEvictableIdleTimeMillis=60000,softMinEvictableIdleTimeMillis=1800000,numTestsPerEvictionRun=-1,evictionPolicyClassName=org.apache.commons.pool2.impl.DefaultEvictionPolicy,testOnBorrow=false,testOnReturn=false,testWhileIdle=true,timeBetweenEvictionRunsMillis=30000,blockWhenExhausted=true,jmxEnabled=true,jmxNamePrefix=pool]
  </code></pre>
  
  <p>... but as soon as I try to access the cache from my application like this</p>
  
  <pre><code>Cache.set(id, tokenTrace, (expiration.getMillis / 1000).asInstanceOf[Int])
  </code></pre>
  
  <p>... I get the following warning:</p>
  
  <pre><code>[warn] application - could not deserialize key:ecbba6d3-3ef2-4bbe-a979-d0e68ffee9bd ex:redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
  redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
  at redis.clients.util.Pool.getResource(Pool.java:42)
  at org.sedis.Pool.withJedisClient(sedis.scala:101)
  at com.typesafe.plugin.RedisPlugin$$anon$1.get(RedisPlugin.scala:178)
  at play.api.cache.Cache$.get(Cache.scala:80)
  at services.auth.cache.CacheTokenTraceDaoComponent$CacheTokenTraceDao$$anonfun$remove$2.apply$mcI$sp(CacheTokenTraceDaoComponent.scala:70)
  </code></pre>
  
  <p>Am I missing something?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The <code>TokenTrace</code> class just traces a JWT and looks like this:</p>
  
  <pre><code>class TokenTrace private(protected var json: JsValue) extends JsEntity
    with Serializable {
  
    def id = json as (__ \ 'id).readNullable[String]
    def id_= (v: Option[String]) = setValue((__ \ 'id), Json.toJson(v))
    def username = json as (__ \ 'username).readNullable[String]
    def username_= (v: Option[String]) = setValue((__ \ 'username), Json.toJson(v))
    def expirationTime = json as (__ \ 'expirationTime).read[DateTime]
    def expirationTime_= (v: DateTime) = setValue((__ \ 'expirationTime), Json.toJson(v))
  
    def copy(json: JsValue) = throw new UnsupportedOperationException
    override def toString = json.toString
  } 
  </code></pre>