class RedisCache extends AbstractCache<K, V> {

  @Override
  @SuppressWarnings("unchecked")
  public V get(final K key) {
    try {
      final byte[] serializedKey = serializer.serialize(key);
      byte[] serializedValue = client.get(serializedKey);
      V value = null;
      if(serializedValue != null && serializedValue.length > 0){
        value = (V) serializer.deserialize(serializedValue);
      }
      if (value == null) {
        stats.incrementMissCount();
        value = cacheLoader.load(key);
        if (value != null) {
          serializedValue = serializer.serialize(value);
          client.set(serializedKey, serializedValue);
          stats.incrementLoadCount();
        }
      } else {
        stats.incrementHitCount();
      }
      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);

}