Redis Cache libraries for Java


Azure Redis Cache is a secure, distributed key-value store based on the popular open source Redis cache.

To get started with Azure Redis Cache, see How to use Azure Redis Cache with Java.

Client library

Connect to Azure Redis Cache and store and retrieve values from the cache using the open-source Jedis client.

Add a dependency to your Maven pom.xml file to use the client library in your project.



Connect to Azure Redis and insert a string into the cache.

JedisShardInfo shardInfo = new JedisShardInfo("<name>", 6380, useSsl);
    shardInfo.setPassword("<key>"); /* Use your access key. */
    Jedis jedis = new Jedis(shardInfo);
    jedis.set("foo", "bar");

Management API

Create and scale Azure Redis resources and manage access keys to with the management API.



Create a new Azure Redis Cache in the two-node standard tier.

RedisCache cache = azure.redisCaches().define(redisCacheName1)


Manage Azure Redis Cache

Explore more sample Java code for Azure Redis Cache you can use in your apps.