NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Maven Central, #711 by repository stars
Jedis is a blazingly small and sane Redis java client.
Latest stable
8.1.0
Last release 4 days ago
26 Nov 2026
Ships on a steady schedule
a new release about every 4 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
16 years old
149 releases · first in 2010
Drag across the ruler to compare, or tap a release to open it.
Jedis 8.1.0 is the general availability release of 8.1. It ships Smart Client Handoffs (SCH) for standalone and Redis Cluster clients and adds support
Jedis 8.1.0 is the general availability release of 8.1. It ships Smart Client Handoffs (SCH) for standalone and Redis Cluster clients and adds support for new Redis 8.12 commands. See the 8.1.0 release notes for upgrade details.
Smart Client Handoffs (SCH)
Smart client handoffs is a feature of Redis Cloud and Redis Software that notifies clients about planned maintenance shortly before it happens, so the client can respond gracefully instead of hitting command timeouts and dropped connections. SCH requires RESP3 and is enabled by default on RESP3 connections; see the Jedis SCH guide for configuration options.
RedisClient): relaxed timeouts and pre-handoffs.RedisClusterClient): relaxed timeouts and in-place slot map updates, so migrated slots are re-routed without a topology refresh. See the Redis Cluster section of the guide.Redis 8.12 support
ZMOVE, BZMOVE and ZMOVEMEMBER.BITRANGEINTARRAY.SEXPIRE, SADDEX, STTL, ...).BLESS command family, to protect keys from eviction.We'd like to thank all the contributors who worked on this release!
@CCCLL, @Dgramada, @HDPark95, @Hyuvo, @Rainmemery, @RaphaelFakhri, @a-TODO-rov, @amalsaidov, @atakavci, @bobymicroby, @dawnwang3692, @dependabot[bot], @dlwhdgus0810, @ggivo, @insaf021, @jakezwang, @kalayciburak, @kdelay, @kimsanhaa, @uglide and dependabot[bot]
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Jedis 8.1.0-beta2 is the second pre-release of the upcoming 8.1.0. It extends Smart Client Handoffs (SCH), introduced for RedisClient in 8.1.0-beta1,
Jedis 8.1.0-beta2 is the second pre-release of the upcoming 8.1.0. It extends Smart Client Handoffs (SCH), introduced for RedisClient in 8.1.0-beta1, to Redis Cluster via RedisClusterClient.
Smart client handoffs is a feature of Redis Cloud and Redis Software that notifies clients about planned maintenance shortly before it happens, so the client can respond gracefully instead of hitting command timeouts and dropped connections. SCH requires RESP3 and is enabled by default on RESP3 connections; see the Jedis SCH guide for configuration options.
RedisClient): relaxed timeouts and pre-handoffs.RedisClusterClient): relaxed timeouts and in-place slot map updates, so migrated slots are re-routed without a topology refresh. See the Redis Cluster section of the guide.This is a pre-release: APIs introduced here may change before 8.1.0 GA.
We'd like to thank all the contributors who worked on this release!
@CCCLL, @Dgramada, @HDPark95, @Rainmemery, @RaphaelFakhri, @atakavci, @bobymicroby, @dependabot[bot], @dlwhdgus0810, @ggivo, @insaf021, @jakezwang, @kalayciburak, @kdelay, @kimsanhaa, @uglide and dependabot[bot]
Jedis 8.1.0-beta1 is the first pre-release of the upcoming 8.1.0, introducing support for Smart Client Handoffs (SCH) (#4668).
Jedis 8.1.0-beta1 is the first pre-release of the upcoming 8.1.0, introducing support for Smart Client Handoffs (SCH) (#4668).
Smart client handoffs is a feature of Redis Cloud and Redis Software that notifies clients about planned maintenance shortly before it happens, so the client can respond gracefully instead of hitting command timeouts and dropped connections. Jedis reacts with relaxed timeouts and pre-handoffs. SCH requires RESP3 and is enabled automatically on RESP3 connections; see the Jedis SCH guide for configuration options.
This is a pre-release: APIs introduced here may change before 8.1.0 GA.
We'd like to thank all the contributors who worked on this release!
@HDPark95, @atakavci, @bobymicroby, @dependabot[bot], @ggivo, @insaf021, @kalayciburak, @uglide
Full Changelog: https://github.com/redis/jedis/compare/v8.0.0...v8.1.0-beta1
Jedis 8.0.2 is a maintenance release for the 8.0 line, fixing MultiDbClient failover so it recovers to a healed database and keeps health checks runni
Jedis 8.0.2 is a maintenance release for the 8.0 line, fixing MultiDbClient failover so it recovers to a healed database and keeps health checks running when no failover candidate is available.
We'd like to thank all the contributors who worked on this release!
@ggivo
Full Changelog: https://github.com/redis/jedis/compare/v8.0.1...v8.0.2
Jedis 8.0.1 is a maintenance release for the 8.0 line, fixing stale cluster topology after failover in JedisCluster.
Jedis 8.0.1 is a maintenance release for the 8.0 line, fixing stale cluster topology after failover in JedisCluster.
We'd like to thank all the contributors who worked on this release!
@insaf021
Full Changelog: https://github.com/redis/jedis/compare/v8.0.0...v8.0.1
Removal of deprecated UnifiedJedis public constructors
Jedis 8.0.0 completes the client class consolidation started in 7.0.0, modernizes protocol defaults, tightens security defaults, and adds command coverage for Redis 8.8 and the Redis 8.10 preview.
For step-by-step upgrade instructions, see the v7 → v8 migration guide: https://redis.github.io/jedis/migration-guides/v7-to-v8/
COUNT aggregator support for ZINTER / ZINTERSTORE / ZUNION / ZUNIONSTORE (Redis 8.8) (#4506)MultiDbClient failback test (#4491)Full Changelog: https://github.com/redis/jedis/compare/v7.4.0...v8.0.0
We'd like to thank all the contributors who worked on this release!
@Ra9huvansh, @a-TODO-rov, @agarwalbharat, @arpitjain099, @atakavci, @dependabot[bot], @eddieran, @ggivo, @guyroyse, @insaf021, @juntae6942, @lh0156, @martin-nagy, @renechoi, @stellhub, @tishun, @uglide
Removal of deprecated UnifiedJedis public constructors
Jedis 8.0.0-beta1 is the first pre-release of the upcoming 8.0 major line. It focused on completing the client class consolidation, modernizing protocol defaults, tightening security defaults, and adding support for new Redis 8.8 commands.
For step-by-step upgrade instructions, see the v7 → v8 migration guide: https://redis.github.io/jedis/migration-guides/v7-to-v8/
COUNT aggregator support for ZINTER / ZINTERSTORE / ZUNION / ZUNIONSTORE (Redis 8.8) (#4506)MultiDbClient failback test (#4491)Full Changelog: https://github.com/redis/jedis/compare/v7.5.0...v8.0.0-beta1
We'd like to thank all the contributors who worked on this release!
@Ra9huvansh, @a-TODO-rov, @arpitjain099, @atakavci, @dependabot, @dependabot[bot], @eddieran, @ggivo, @martin-nagy, @stellhub, @tishun and @uglide
This is a maintenance release with fixes for FT.HYBRID queries and connection pool handshake overhead. Recommended for any deployment using FT.HYBRID
This is a maintenance release with fixes for FT.HYBRID queries and connection pool handshake overhead. Recommended for any deployment using FT.HYBRID with Combiner.as(...) or MultiDbClient.
FT.HYBRID COMBINE argument count omitting YIELD_SCORE_AS tokens, causing the command to be rejected when a combined-score alias is set via Combiner.as(...). Fix by @guyroyse in https://github.com/redis/jedis/pull/4575, backported to 7.5.x in https://github.com/redis/jedis/pull/4576.Connection in TrackingConnectionPool (used by MultiDbClient). https://github.com/redis/jedis/pull/4547, backported to 7.5.x in https://github.com/redis/jedis/commit/dd42b3e70707258646029d18f6628f45064b1c60.Full Changelog: https://github.com/redis/jedis/compare/v7.5.2...v7.5.3
CommandObjects refactoring Part 4: Backport deprecations to 7.5.x by @uglide in https://github.com/redis/jedis/pull/4517
This is a maintenance release focused on improving the stability of the Automatic Failover feature (MultiDbClient). Recommended for any deployment using MultiDbClient / multi-database failover.
Nothing published for this version
Deprecate legacy SSL configuration in favor of SslOptions (#4497).
This release refines TLS behaviour to enhance security and begins consolidating TLS configuration on SslOptions. The introduction of hostname verification by default significantly improves the safety of TLS connections. For further details, see #4497.
ssl(true) TLS path now enables hostname verification by default (#4497). It now rejects certificates whose SAN/CN does not match the target host, making TLS connections safer. The SslOptions-based configuration remains unchanged.SslOptions (#4497).@ggivo
Full Changelog: https://github.com/redis/jedis/compare/v7.4.1...v7.5.0
*[ClusterPipeline] ExecutorService/thread is created and destroyed too frequently in ClusterPipeline by @ggivo in https://github.com/redis/jedis/pull/
Jedis 7.4.1 (Patch Release)
*[ClusterPipeline] ExecutorService/thread is created and destroyed too frequently in ClusterPipeline by @ggivo in https://github.com/redis/jedis/pull/4480
Full Changelog: https://github.com/redis/jedis/compare/v7.4.0...v7.4.1
The Jedis 7.4.0 release introduces enhancements to the Client-side geographic failover API, improves transaction support, and deprecates sendCommand()…
The Jedis 7.4.0 release introduces enhancements to the Client-side geographic failover API, improves transaction support, and deprecates sendCommand() to improve compatibility with the Redis Cluster API.
We'd like to thank all the contributors who worked on this release!
@a-TODO-rov, @atakavci, @dependabot, @dependabot[bot], @ggivo and @uglide
Add missing command deprecations
Jedis 7.3.0 introduces support for Redis 8.6, including new commands and features for streams idempotent production, and HOTKEYS.
We'd like to thank all the contributors who worked on this release!
@Dgramada, @Peter-Sh, @a-TODO-rov, @atakavci, @dependabot, @dependabot[bot], @ggivo, @uglide and @viktoriya-kutsarova
Cluster client builders ignore custom timeout/attempts when calculating maxTotalRetriesDuration #4395
Jedis 7.2.1 (Patch Release)
We'd like to thank all the contributors who worked on this release!
@ggivo
Jedis 7.2.0 introduces new client classes that simplify client creation while providing builder-based configuration for advanced use cases.
Jedis 7.2.0 introduces new client classes that simplify client creation while providing builder-based configuration for advanced use cases.
RedisClient - Standalone Redis client (replaces JedisPooled and JedisPool)RedisClusterClient - Redis Cluster client (replaces JedisCluster)RedisSentinelClient - Redis Sentinel client (replaces JedisSentineled and JedisSentinelPool)We'd like to thank all the contributors who worked on this release!
@andy-stark-redis, @dependabot, @dependabot[bot], @ggivo, @oscar-besga-panel, @senocak, @uglide and @viktoriya-kutsarova
Jedis 7.1.0 release adds support for Redis 8.4, including new commands and features
Jedis 7.1.0 release adds support for Redis 8.4, including new commands and features
resilience4j-all (#4321)We'd like to thank all the contributors who worked on this release!
@ChrisMcD1, @a-TODO-rov, @dependabot, @dependabot[bot], @ggivo and @uglide
More details on breaking changes
Jedis 7.0.0 is a major release that modernizes the API, removes deprecated features, and introduces enhanced failover/failback behavior.
The main focus areas of this release are:
JedisPooled, JedisCluster, and JedisSentinel.JedisSharding and related classes have been removed.For detailed migration guidance, refer to Jedis 7.0.0 Migration Guide.
JedisSharding (#4311)MultiCluster* classes and methods have been renamed and improved.More details on breaking changes
We'd like to thank all the contributors who worked on this release!
@SwapnaliY16, @andy-stark-redis, @atakavci, @dependabot, @dependabot[bot], @ggivo and @uglide
[vector sets] Support for VSIM WITHATTRIBS (CAE-1421)
We'd like to thank all the contributors who worked on this release!
@JuneYub, @Kguswo, @dependabot, @dependabot[bot] and @ggivo
Add support for SVS-VAMANA vector indexing
We'd like to thank all the contributors who worked on this release!
@219sansim, @YoHanKi, @andy-stark-redis, @ggivo, @jujn, @thachlp, @uglide and @xrayw
Starting from version 8.0, Redis supports new data structures and capabilities such as JSON, Search & Query, and TimeSeries by default. This release i
Starting from version 8.0, Redis supports new data structures and capabilities such as JSON, Search & Query, and TimeSeries by default. This release improves Jedis compatibility with Redis 8.0.
This release introduces a client-side default dialect for Redis’ search and query capabilities. By default, the client now overrides the server-side dialect with version 2, automatically appending DIALECT 2 to commands like FT.AGGREGATE and FT.SEARCH.
Important: Be aware that the query dialect may impact the results returned. If needed, you can revert to a different dialect version by configuring the client accordingly.
UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379");
jedis.setDefaultSearchDialect(1); // DIALECT 1
You can find further details in the query dialect documentation.
This release also removes support for both RedisGraph and Triggers & Functions(aka RedisGears v2).
We'd like to thank all the contributors who worked on this release!
@andy-stark-redis, @atakavci, @ggivo, @joshrotenberg, @ozennou, @sanaulla123, @sazzad16, @smadasu, @thachlp, @tishun and @uglide
🛠️ Maintenance Pre-release – This version includes no functional changes. It serves as a pre-release of Jedis that has been validated for compatibilit
🛠️ Maintenance Pre-release – This version includes no functional changes. It serves as a pre-release of Jedis that has been validated for compatibility with Redis Community Edition 8.0 RC1.
We'd like to thank all the contributors who worked on this release!
@atakavci, @ggivo, @sazzad16, @thachlp
Full Changelog: https://github.com/redis/jedis/compare/6.0.0-beta1...v6.0.0-beta2
Graph module support and Triggers and Functions have been removed. These features have been deprecated in Redis. See the official deprecation notice f…
The 6.0.0-Beta1 release introduces major changes, new features, and improvements:
This release introduces a client-side default dialect for Redis’ search and query capabilities. By default, the client now overrides the server-side dialect with version 2, automatically appending DIALECT 2 to commands like FT.AGGREGATE and FT.SEARCH.
Important: Be aware that the query dialect may impact the results returned. If needed, you can revert to a different dialect version by configuring the client accordingly.
UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379");
jedis.setDefaultSearchDialect(1); // DIALECT 1
You can find further details in the query dialect documentation
We'd like to thank all the contributors who worked on this release!
@andy-stark-redis, @atakavci, @dependabot, @ggivo, @joshrotenberg, @ozennou, @sanaulla123, @sazzad16, @smadasu, @thachlp, @tishun and @uglide
Token-based authentication support and Microsoft Entry ID integration by leveraging the new core authentication extension
We'd like to thank all the contributors who worked on this release!
@andy-stark-redis, @atakavci, @dependabot, @dependabot[bot], @ggivo, @joshrotenberg, @sazzad16, @thachlp and @uglide
Deprecate Triggers and Functions feature
We are happy to announce that improved server-assisted, client-side caching is now generally available! Special thanks to all our beta testers for their valuable feedback, which helped us refine and improve the initial implementation.
Client-side caching is supported exclusively with the RESP3 protocol with Redis >= 7.4 and is available in UnifiedJedis, JedisPooled, and JedisCluster and other classes.
public class CSCExampleTest {
public static void main() {
HostAndPort node = HostAndPort.from("localhost:6379");
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol is required for client-side caching
//.user("myuser") // Redis server username (optional)
//.password("mypass") // Redis user's password (optional)
.build();
CacheConfig cacheConfig = getCacheConfig();
Cache cache = CacheFactory.getCache(cacheConfig);
try (UnifiedJedis client = new UnifiedJedis(node, clientConfig, cache)) {
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // Cache hit
System.out.println("Cache size: " + cache.getSize()); // 1
System.out.println(cache.getStats().toString());
//Let's change the value of "foo" to invalidate the value stored in the local cache
client.mset("foo", "new_value", "ignore_me:1", "another_value");
Thread.sleep(1000); // wait for the cache invalidation to happen
System.out.println(client.get("foo")); // Cache miss
System.out.println(cache.getStats().toString());
client.get("ignore_me:1"); // Client will ignore this key
System.out.println("Cache size: " + cache.getSize()); // still 1
// check the cache stats
System.out.println(cache.getStats().toString());
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
private static CacheConfig getCacheConfig() {
// This is a simple cacheable implementation that ignores keys starting with "ignore_me"
Cacheable cacheable = new DefaultCacheable() {
final String IGNORE_PREFIX = "ignore_me";
@Override
public boolean isCacheable(ProtocolCommand command, List<Object> keys) {
// assuming we'll only execute methods with string keys
List<String> stringKeys = keys.stream()
.filter(obj -> obj instanceof String)
.map(obj -> (String) obj)
.collect(Collectors.toList());
for (String key : stringKeys) {
if (key.startsWith(IGNORE_PREFIX)) {
return false;
}
}
return isDefaultCacheableCommand(command);
}
};
// Create a cache with a maximum size of 10000 entries
return CacheConfig.builder()
.maxSize(10000)
.cacheable(cacheable)
.build();
}
}
It is possible to limit or ignore commands or keys for client-side caching. The getCacheConfig method presented above provides an example of how to achieve that.
synchronized with j.u.c.l.ReentrantLock for Loom (#3480)We'd like to thank all the contributors who worked on this release!
@Gandalf1783, @Lcarrot, @SoilChang, @andy-stark-redis, @ascdi, @babanin, @cemasma, @chayim, @dependabot, @dependabot[bot], @gerzse, @jjz921024, @jongwooo, @sazzad16, @stillerrr, @thachlp, @uglide, @vanta and @zyfx595701088
We've substantially improved server-assisted, client-side caching in response to user feedback. It is currently a beta grade.
We've substantially improved server-assisted, client-side caching in response to user feedback. It is currently a beta grade.
Client-side caching is supported exclusively with the RESP3 protocol and is available in UnifiedJedis, JedisPooled, and JedisCluster and other classes.
public class CSCExampleTest {
public static void main() {
HostAndPort node = HostAndPort.from("localhost:6379");
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol is required for client-side caching
//.user("myuser") // Redis server username (optional)
//.password("mypass") // Redis user's password (optional)
.build();
CacheConfig cacheConfig = getCacheConfig();
Cache cache = CacheFactory.getCache(cacheConfig);
try (UnifiedJedis client = new UnifiedJedis(node, clientConfig, cache)) {
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // Cache hit
System.out.println("Cache size: " + cache.getSize()); // 1
System.out.println(cache.getStats().toString());
//Let's change the value of "foo" to invalidate the value stored in the local cache
client.mset("foo", "new_value", "ignore_me:1", "another_value");
Thread.sleep(1000); // wait for the cache invalidation to happen
System.out.println(client.get("foo")); // Cache miss
System.out.println(cache.getStats().toString());
client.get("ignore_me:1"); // Client will ignore this key
System.out.println("Cache size: " + cache.getSize()); // still 1
// check the cache stats
System.out.println(cache.getStats().toString());
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
private static CacheConfig getCacheConfig() {
// This is a simple cacheable implementation that ignores keys starting with "ignore_me"
Cacheable cacheable = new DefaultCacheable() {
final String IGNORE_PREFIX = "ignore_me";
@Override
public boolean isCacheable(ProtocolCommand command, List<Object> keys) {
// assuming we'll only execute methods with string keys
List<String> stringKeys = keys.stream()
.filter(obj -> obj instanceof String)
.map(obj -> (String) obj)
.collect(Collectors.toList());
for (String key : stringKeys) {
if (key.startsWith(IGNORE_PREFIX)) {
return false;
}
}
return isDefaultCacheableCommand(command);
}
};
// Create a cache with a maximum size of 10000 entries
return CacheConfig.builder()
.maxSize(10000)
.cacheable(cacheable)
.build();
}
}
It is possible to limit or ignore commands or keys for client-side caching. The getCacheConfig method presented above provides an example of how to achieve that.
Deprecate unused JSON.ARRAPPEND in CommandObjects
In this release, we added support for Redis 7.4-RC1, including:
This release supports server-assisted, client-side caching, and is currently beta grade.
Client-side caching is available within UnifiedJedis, JedisPooled, JedisCluster, etc classes via implementation of ClientSideCache class, with only RESP3 protocol. It is recommended to use a ClientSideCache implementation with TTL (time-to-live). We have included two implementations based on Google Guava and Caffeine libraries.
import redis.clients.jedis.*;
import redis.clients.jedis.csc.*;
class CacheExample {
public static void main() {
HostAndPort node = HostAndPort.from("localhost:6379");
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol
//.user("myuser") // Redis server username (optional)
//.password("mypass") // Redis user's password (optional)
.build();
ClientSideCache clientSideCache;
// Uncomment one of the following lines to use the corresponding cache backend
// GuavaClientSideCache clientSideCache = GuavaClientSideCache.builder().maximumSize(10_000).ttl(100).build();
// CaffeineClientSideCache clientSideCache = CaffeineClientSideCache.builder().maximumSize(10_000).ttl(100).build();
UnifiedJedis client = new UnifiedJedis(node, clientConfig, clientSideCache);
// JedisPooled client = new JedisPooled(node, clientConfig, clientSideCache);
// JedisCluster client = new JedisCluster(Collections.singleton(node), clientConfig, clientSideCache);
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // cache hit
client.del("foo");
client.close();
}
}
It is highly recommended to use a ClientSideCache implementation with TTL.
Both of our provided GuavaClientSideCache and CaffeineClientSideCache have TTL support and use a default value when not set. It is discouraged to use ttl(0) in these.
It is also a good idea to keep the idle connections busy to get more and updated notifications. It can be done easily using pool config:
GenericObjectPoolConfig<Connection> poolConfig = new ConnectionPoolConfig();
poolConfig.setTestWhileIdle(true); // ConnectionPoolConfig by default does this.
// It is still shown here for better understanding.
This pool config can be used as follows:
JedisPooled client = new JedisPooled(node, clientConfig, clientSideCache, poolConfig);
JedisCluster client = new JedisCluster(Collections.singleton(node), clientConfig, clientSideCache, poolConfig);
It is possible to limit or ignore commands and/or keys for client side caching. For example, if we want to ignore some keys based on their prefix, we can define a ClientSideCacheable:
final String IGNORE_PREFIX = "PREFIX_TO_IGNORE";
ClientSideCacheable isCacheable = new ClientSideCacheable() {
@Override
public boolean isCacheable(ProtocolCommand command, Object... keys) {
for (String key : (String[]) keys) { // assuming we'll only execute methods with String keys
if (key.startsWith(IGNORE_PREFIX)) {
return false;
}
}
return true;
}
};
This ClientSideCacheable can be a parameter for ClientSideCache. In our provided implementations, it can be:
GuavaClientSideCache clientSideCache = GuavaClientSideCache.builder().cacheable(isCacheable).build();
CaffeineClientSideCache clientSideCache = CaffeineClientSideCache.builder().cacheable(isCacheable).build();
It is also possible to create client-side caching enabled client object using URL/URI with proper query params. Supported params are:
cache_lib (caching library) - required; can be either guava or caffeinecache_max_size (maximum no of commands) - optionalcache_ttl (time-to-live, in seconds) - optionalFor example:
JedisPooled client = new JedisPooled("redis://myuser:mypass@localhost:6379/?cache_lib=guava&cache_max_size=10000&cache_ttl=100");
We'd like to thank all the contributors who worked on this release!
@Lcarrot, @cemasma, @chayim, @gerzse, @sazzad16 and @uglide
Re-released as 5.2.0-beta4.
Re-released as 5.2.0-beta4.
This release supports server-assisted, client-side caching, and is currently beta grade.
This release supports server-assisted, client-side caching, and is currently beta grade.
Client-side caching is available within UnifiedJedis, JedisPooled, JedisCluster, etc classes via implementation of ClientSideCache class, with only RESP3 protocol. It is recommended to use a ClientSideCache implementation with TTL (time-to-live). We have included two implementations based on Google Guava and Caffeine libraries.
import redis.clients.jedis.*;
import redis.clients.jedis.csc.*;
class CacheExample {
public static void main() {
HostAndPort node = HostAndPort.from("localhost:6379");
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol
//.user("myuser") // Redis server username (optional)
//.password("mypass") // Redis user's password (optional)
.build();
ClientSideCache clientSideCache;
// Uncomment one of the following lines to use the corresponding cache backend
// GuavaClientSideCache clientSideCache = GuavaClientSideCache.builder().maximumSize(10_000).ttl(100).build();
// CaffeineClientSideCache clientSideCache = CaffeineClientSideCache.builder().maximumSize(10_000).ttl(100).build();
UnifiedJedis client = new UnifiedJedis(node, clientConfig, clientSideCache);
// JedisPooled client = new JedisPooled(node, clientConfig, clientSideCache);
// JedisCluster client = new JedisCluster(Collections.singleton(node), clientConfig, clientSideCache);
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // cache hit
client.del("foo");
client.close();
}
}
It is highly recommended to use a ClientSideCache implementation with TTL.
Both of our provided GuavaClientSideCache and CaffeineClientSideCache have TTL support and use a default value when not set. It is discouraged to use ttl(0) in these.
It is also a good idea to keep the idle connections busy to get more and updated notifications. It can be done easily using pool config:
GenericObjectPoolConfig<Connection> poolConfig = new ConnectionPoolConfig();
poolConfig.setTestWhileIdle(true); // ConnectionPoolConfig by default does this.
// It is still shown here for better understanding.
This pool config can be used as follows:
JedisPooled client = new JedisPooled(node, clientConfig, clientSideCache, poolConfig);
JedisCluster client = new JedisCluster(Collections.singleton(node), clientConfig, clientSideCache, poolConfig);
It is possible to limit or ignore commands and/or keys for client side caching. For example, if we want to ignore some keys based on their prefix, we can define a ClientSideCacheable:
final String IGNORE_PREFIX = "PREFIX_TO_IGNORE";
ClientSideCacheable isCacheable = new ClientSideCacheable() {
@Override
public boolean isCacheable(ProtocolCommand command, Object... keys) {
for (String key : (String[]) keys) { // assuming we'll only execute methods with String keys
if (key.startsWith(IGNORE_PREFIX)) {
return false;
}
}
return true;
}
};
This ClientSideCacheable can be a parameter for ClientSideCache. In our provided implementations, it can be:
GuavaClientSideCache clientSideCache = GuavaClientSideCache.builder().cacheable(isCacheable).build();
CaffeineClientSideCache clientSideCache = CaffeineClientSideCache.builder().cacheable(isCacheable).build();
It is also possible to create client-side caching enabled client object using URL/URI with proper query params. Supported params are:
cache_lib (caching library) - required; can be either guava or caffeinecache_max_size (maximum no of commands) - optionalcache_ttl (time-to-live, in seconds) - optionalFor example:
JedisPooled client = new JedisPooled("redis://myuser:mypass@localhost:6379/?cache_lib=guava&cache_max_size=10000&cache_ttl=100");
This release supports server-assisted, client-side caching, and is currently beta grade.
This release supports server-assisted, client-side caching, and is currently beta grade.
Client-side caching is available within UnifiedJedis, JedisPooled, JedisCluster, etc classes via implementation of ClientSideCache class, with only RESP3 protocol. It is recommended to use a ClientSideCache implementation with TTL (time-to-live). We have included two implementations based on Google Guava and Caffeine libraries.
import redis.clients.jedis.*;
import redis.clients.jedis.csc.*;
class CacheExample {
public static void main() {
HostAndPort node = HostAndPort.from("localhost:6379");
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol
//.user("myuser") // Redis server username (optional)
//.password("mypass") // Redis user's password (optional)
.build();
ClientSideCache clientSideCache;
// Uncomment one of the following lines to use the corresponding cache backend
// GuavaClientSideCache clientSideCache = GuavaClientSideCache.builder().maximumSize(10_000).ttl(100).build();
// CaffeineClientSideCache clientSideCache = CaffeineClientSideCache.builder().maximumSize(10_000).ttl(100).build();
UnifiedJedis client = new UnifiedJedis(node, clientConfig, clientSideCache);
// JedisPooled client = new JedisPooled(node, clientConfig, clientSideCache);
// JedisCluster client = new JedisCluster(Collections.singleton(node), clientConfig, clientSideCache);
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // cache hit
client.del("foo");
client.close();
}
}
It is highly recommended to use a ClientSideCache implementation with TTL.
Both of our provided GuavaClientSideCache and CaffeineClientSideCache have TTL support and use a default value when not set. It is discouraged to use ttl(0) in these.
It is also a good idea to keep the idle connections busy to get more and updated notifications. It can be done easily using pool config:
GenericObjectPoolConfig<Connection> poolConfig = new ConnectionPoolConfig();
poolConfig.setTestWhileIdle(true); // ConnectionPoolConfig by default does this.
// It is still shown here for better understanding.
This pool config can be used as follows:
JedisPooled client = new JedisPooled(node, clientConfig, clientSideCache, poolConfig);
JedisCluster client = new JedisCluster(Collections.singleton(node), clientConfig, clientSideCache, poolConfig);
It is possible to limit or ignore commands and/or keys for client side caching. For example, if we want to ignore some keys based on their prefix, we can define a ClientSideCacheable:
final String IGNORE_PREFIX = "PREFIX_TO_IGNORE";
ClientSideCacheable isCacheable = new ClientSideCacheable() {
@Override
public boolean isCacheable(ProtocolCommand command, Object... keys) {
for (String key : (String[]) keys) { // assuming we'll only execute methods with String keys
if (key.startsWith(IGNORE_PREFIX)) {
return false;
}
}
return true;
}
};
This ClientSideCacheable can be a parameter for ClientSideCache. In our provided implementations, it can be:
GuavaClientSideCache clientSideCache = GuavaClientSideCache.builder().cacheable(isCacheable).build();
CaffeineClientSideCache clientSideCache = CaffeineClientSideCache.builder().cacheable(isCacheable).build();
It is also possible to create client-side caching enabled client object using URL/URI with proper query params. Supported params are:
cache_lib (caching library) - required; can be either guava or caffeinecache_max_size (maximum no of commands) - optionalcache_ttl (time-to-live, in seconds) - optionalFor example:
JedisPooled client = new JedisPooled("redis://myuser:mypass@localhost:6379/?cache_lib=guava&cache_max_size=10000&cache_ttl=100");
This release provides support for server-assisted, client-side caching, and is currently alpha grade.
This release provides support for server-assisted, client-side caching, and is currently alpha grade.
Client-side caching is available within UnifiedJedis, JedisPooled, JedisCluster, etc classes via implementation of ClientSideCache class, with RESP3 only. It is recommended a ClientSideCache implementation with TTL (time-to-live). We have included two implementations based on Google Guava and Caffeine libraries.
class CacheExample {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
JedisClientConfig config = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol
.password("foobared")
.build();
ClientSideCache csc;
// ClientSideCache csc = GuavaCSC.builder().maximumSize(1000).ttl(100).build();
// ClientSideCache csc = CaffeineCSC.builder().maximumSize(1000).ttl(100).build();
UnifiedJedis client = new UnifiedJedis(hnp, config, csc);
// JedisPooled client = new JedisPooled(hnp, config, csc);
// JedisCluster client = new JedisCluster(Collections.singleton(hnp), config, csc);
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // cache hit
client.del("foo");
client.close();
}
}
This release provides support for server-assisted, client-side caching, and is currently alpha grade. Currently it is supported on top of the Jedis cl
This release provides support for server-assisted, client-side caching, and is currently alpha grade. Currently it is supported on top of the Jedis class, and will be merged to Jedis/UnifiedJedis classes via configuration parameters.
Client-side caching is available through JedisClientSideCache class, with RESP3 only.
Note: The process of ensuring the last invalidation when there is none, is still time consuming; it is suggested to use a smaller socket timeout if this is an issue. We have started with only GET command at this moment.
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisClientConfig;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.JedisClientSideCache;
class CacheExample {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
JedisClientConfig config = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol
.socketTimeoutMillis(20) // smaller socket timeout
.password("foobared")
.build();
JedisClientSideCache jCache = new JedisClientSideCache(hnp, config);
jCache.set("foo", "bar");
jCache.get("foo");
jCache.get("foo"); // cache hit
jCache.del("foo");
jCache.close();
}
}
Accept null replies for BZPOPMAX and BZPOPMIN commands
We'd like to thank all the contributors who worked on this release!
@JW-Vinay, @ngavrailov and @sazzad16
Address change in JSON.GET command without path
We'd like to thank all the contributors who worked on this release!
@sazzad16, @cemasma, @Lcarrot, @gerzse and @uglide
Custom connection pool to MultiClusterPooledConnectionProvider
We'd like to thank all the contributors who worked on this release!
@gerzse, @sazzad16, @thachlp and @jarkus4
Stop connection fetching before sync/exec in multi cluster failover mode
Replace deprecated set-output command with environment file
We'd like to thank all the contributors who worked on this release!
@dependabot, @dependabot[bot], @jongwooo, @sazzad16 and @stillerrr
Adding Pipeline & Transaction with failover to multi cluster
We'd like to thank all the contributors who worked on this release!
@bsbodden, @chayim, @dependabot, @dependabot[bot], @ihaohong, @sazzad16, @wormogig and @yangbodong22011
Fix SORTABLE argument when creating a Search index using FT.CREATE
In the 5.0.0 release, the encoded/String variants of scripting methods return List > for a map reply - those now return Map<>.
List<KeyValue<>> for a map reply - those now return Map<>.We'd like to thank all the contributors who worked on this release!
@sazzad16
Deprecate Sharding/Sharded feature
We're happy to introduce the Cross-Cluster Failover feature in Jedis. This feature provides high availability and resilience by allowing seamless transitions between Redis clusters during unforeseen failures or downtimes. It's a built-in tool to minimize manual intervention and downtime and ensure a more resilient application infrastructure. Learn more about how you can automate the failover process in our documentation.
Examples to enable RESP3 are included later in this release note.
This release introduces enabling RESP3 Redis connection, when the Redis server supports it.
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.UnifiedJedis;
class DoResp3 {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
UnifiedJedis c = UnifiedJedis(hnp, DefaultJedisClientConfig.builder().resp3().build());
c.set("foo", "value!");
c.get("foo");
}
}
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
class DoResp3 {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
Jedis c = Jedis(hnp, DefaultJedisClientConfig.builder().resp3().build());
c.set("foo", "value!");
c.get("foo");
}
}
Use List to read RESP3 Map reply
List<KeyValue> to read RESP3 Map reply (#3456)We'd like to thank all the contributors who worked on this release!
@s-sathish, @sazzad16, @shacharPash, @uglide and @yangbodong22011
Support RESP3 protocol through URI/URL
This release includes support enabling RESP3 connection on supported Redis servers.
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.UnifiedJedis;
class DoResp {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
UnifiedJedis c = UnifiedJedis(hnp, DefaultJedisClientConfig.builder().protocol(RedisProtocol.RESP3).build());
c.set("foo", "value!");
c.get("foo");
}
}
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
class DoResp {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
Jedis c = Jedis(hnp, DefaultJedisClientConfig.builder().protocol(RedisProtocol.RESP3).build());
c.set("foo", "value!");
c.get("foo");
}
}
Full Changelog: https://github.com/redis/jedis/compare/v5.0.0-alpha2...v5.0.0-beta1
Please note response types change for those using RESP3 - meaning there breaking changes. Today this includes support for the following:
This release includes support for RESP3, it should be treated as an alpha. Please note response types change for those using RESP3 - meaning there breaking changes. Today this includes support for the following:
This release introduces two different ways to enable a RESP3 redis connection, when your redis server supports RESP1.
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.UnifiedJedis;
class DoResp {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
UnifiedJedis c = UnifiedJedis(hnp, DefaultJedisClientConfig.builder().protocol(RedisProtocol.RESP3).build());
c.set("foo", "value!");
c.get("foo");
}
}
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
class DoResp {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
Jedis c = Jedis(hnp, DefaultJedisClientConfig.builder().protocol(RedisProtocol.RESP3).build());
c.set("foo", "value!");
c.get("foo");
}
}
Full Changelog: https://github.com/redis/jedis/compare/v5.0.0-alpha1...v5.0.0-alpha2
Please note response types change for those using RESP3 - meaning there breaking changes. Today this includes support for the following:
This release includes only support for RESP3, it should be treated as an alpha. Please note response types change for those using RESP3 - meaning there breaking changes. Today this includes support for the following:
The following do not yet support RESP3:
This release introduces two different ways to enable a RESP3 redis connection, when your redis server supports RESP1.
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.UnifiedJedis;
class DoResp {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
UnifiedJedis c = UnifiedJedis(hnp, DefaultJedisClientConfig.builder().protocol(RedisProtocol.RESP3).build());
c.set("foo", "value!");
c.get("foo");
}
}
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
class DoResp {
public static void main() {
HostAndPort hnp = HostAndPort.from("localhost:6379");
Jedis c = Jedis(hnp, DefaultJedisClientConfig.builder().protocol(RedisProtocol.RESP3).build());
c.set("foo", "value!");
c.get("foo");
}
}
Fix ZREVRANGE versions with max/min swapped in MultiNodePipelineBase
We'd like to thank all the contributors who worked on this release!
@sazzad16 and @keeferrourke
Deprecate RediSearchUtil#ToByteArray
We'd like to thank all the contributors who worked on this release!
@sazzad16 and @stillerrr
Fix SORTABLE argument when creating a Search index using FT.CREATE
Extend CLIENT SETINFO support with added suffix rules (#3509, #3536)
We'd like to thank all the contributors who worked on this release!
@sazzad16
Deprecations addressing Jedis 5.0 changes
pipelined() method in JedisSentineled directly returns Pipeline object (#3517)Shutdown ExecutorServices in multi node pipelines
We'd like to thank all the contributors who worked on this release!
@sazzad16, @jslopezgithub
Full Changelog: https://github.com/redis/jedis/compare/v4.4.2...v4.4.3
Add support for the new CLUSTER MYSHARDID command
inactive field in XINFO CONSUMERS reply (#3422)active-time field in XINFO STREAM reply (#3421)We'd like to thank all the contributors who worked on this release!
@sazzad16, @dependabot, @dependabot[bot] and @yangbodong22011
Full Changelog: https://github.com/redis/jedis/compare/v4.4.1...v4.4.2
Add support for WAITAOF command
We'd like to thank all the contributors who worked on this release!
@gniadeck and @yangbodong22011
Improve cluster slots slotNodes using arrays
Broadcast commands listed in #3303
We'd like to thank all the contributors who worked on this release!
@sazzad16, @yangbodong22011, @stillerrr, @chenshi5012, @clebersonp and @dependabot[bot]
Separate builder factory for each module
We'd like to thank all the contributors who worked on this release!
@agavrilov76, @chayim, @dependabot, @dependabot[bot], @jgaoIXL, @sazzad16, @yeikel and @zeekling
Introduce JedisBroadcast to broadcast commands
We'd like to thank all the contributors who worked on this release!
@sazzad16, @agavrilov76, @jgaoIXL, @chayim, @yeikel and @zeekling
Fix JedisPooled constructors missing poolConfig param
We'd like to thank all the contributors who worked on this release!
@sazzad16
Support passing ClusterConnectionProvider to JedisCluster
We'd like to thank all the contributors who worked on this release!
@ham1255 and @sazzad16
4.3.0-m2 release notes 4.3.0-m1 release notes
4.3.0-m2 release notes 4.3.0-m1 release notes
Following are the changes only since the last milestone release. Please check the notes for milestone releases for all changes.
Note - changes to TDIGEST commands may be incompatible with the previous milestone releases.
We'd like to thank all the contributors who worked on this release!
@chayim, @sazzad16, @shangjin92, @shkediy and @tianshuang
One column per quarter.