public class LettuceExample {
public static void main(String[] args) {
RedisClient redisClient = RedisClient.create("redis://localhost");
StatefulRedisConnection<String, String> connection =
redisClient.connect();
RedisCommands<String, String> syncCommands =
connection.sync();
syncCommands.set("key", "value");
String value = syncCommands.get("key");
System.out.println(value);
connection.close();
redisClient.shutdown();
}
}