Skip to content
Bluetape4k docs1.11

Separating cache providers and Spring Data Redis

Latest stable Based on Bluetape4k release 1.11.0

bluetape4k-lettuce and bluetape4k-redisson provide clients and client-specific helpers. The umbrella only exports both modules. Function-result memoization, cache-aside loaders and writers, Spring Cache managers, and Hibernate second-level caching are separate concerns.

CapabilityModuleRelationship to the umbrella
Lettuce commands and coroutinesbluetape4k-lettuceExported by the umbrella
Redisson objects and Near Cachebluetape4k-redissonExported by the umbrella
Cache abstraction with Lettucebluetape4k-cache-lettuceSeparate artifact
Cache abstraction with Redissonbluetape4k-cache-redissonSeparate artifact
Hibernate second-level cachebluetape4k-hibernate-cache-lettuceSeparate provider and region lifecycle
Spring Data Redis serializersbluetape4k-spring-boot-redisSeparate Spring Boot module

Start with a client module when application code executes key-value commands directly. Use a cache module when the application needs shared TTL policy, function-result reuse, or loader/writer behavior. An RMapCache alone does not provide database read-through; verify that actual MapLoader and MapWriter implementations are connected.

The Cache Core manual explains cache-aside, stampede control, Near Cache, and failure contracts independently of a provider. Confirm that the abstraction is needed before selecting a provider.

Spring Data Redis is a separate entry point

Section titled “Spring Data Redis is a separate entry point”

bluetape4k-spring-boot-redis supplies serializers and serialization contexts for RedisTemplate and ReactiveRedisTemplate. Its dependencies and Spring lifecycle are separate from the two-client bundle.

Spring Data Redis may use Lettuce internally without the application calling bluetape4k Lettuce helpers. An application may also use Redisson together with the serializer module, but it must still manage two client pools and serialization boundaries.

Do not add the umbrella when only Spring Data serializers are required.

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>"))
implementation("io.github.bluetape4k:bluetape4k-spring-boot-redis")
}

For a Lettuce-backed cache abstraction, depend on bluetape4k-cache-lettuce. It already declares its required Lettuce dependency, so adding the umbrella is redundant.