@Override
    public <T> Optional<T> get(String key, Class<T> expectedClass) {
        String foundJson = this.jedis.hget(this.cacheName, key);

        if (foundJson == null) {
            return Optional.empty();
        }

        return Optional.of(gson.fromJson(foundJson, expectedClass));
    }
An implementation of {@link Cache} that stores data in Redis.
examples/redis-backed-cache-testng/src/main/java/com/mycompany/cache/RedisBackedCache.java