class RedisCache extends AbstractCache<K, V> {

  @Override
  @SuppressWarnings("unchecked")
  public V invalidate(final K key) {
    try {
      byte[] serializedKey = serializer.serialize(key);
      byte[] serializedValue = client.expire(serializedKey);
      V value = (V) serializer.deserialize(serializedValue);
      evictionListener.onEviction(key, value);
      stats.incrementEvictionCount();
      return value;
    } catch (ConnectionException|IOException e) {
      throw new RedisCacheException(e);
    }
  }

  public  RedisCache(final String name, final CacheLoader<K, V> cacheLoader,
      final EvictionListener<K, V> evictionListener,
      Serializer<Object> serializer, Client client);

}