Questions tagged [spring-data-redis]

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.

Features

  • Abstraction across multiple Redis drivers/connectors such as Lettuce and Jedis.
  • JDK, String, JSON and Spring Object/XML mapping serializers.
  • Spring cache abstraction for use with Redis.
  • JDK Collection implementation on top of Redis.
  • Pub/Sub integration.
  • Reactive and imperative APIs.

Online Resources:

Version History

1029 questions
0
votes
0 answers

Spring boot app freezes when I use Spring data Redis pipelining

I have a Spring boot application which uses Redis for caching. I'm trying to use Redis pipelining to get multiple information in a single call. In my @Configuration class, I have the following configuration for Redis: @Bean JedisConnectionFactory…
drunkenfist
  • 2,958
  • 12
  • 39
  • 73
0
votes
1 answer

Spring Data Redis 1.7.2.RELEASE, Injection RedisOperations instead of RedisTemplate

I have problem while migrating Spring Data Redis 1.5.2.RELEASE to 1.7.2.RELEASE, as RedisCacheManager uses RedisTemplate in 1.5.2.RELEASE and RedisOperations in 1.7.2.RELEASE as constructor parameters. Following is my current Spring Data Redis…
nijogeorgep
  • 762
  • 12
  • 20
0
votes
1 answer

Spring + Redis + Mysql: cache strategy

I'm developing a web application for medical purposes, where the users can create an appointment for a specific patient, doctor and facility. Each facility may have N doctors, and the calendar will be populated with N appointments per doctor and…
IlGala
  • 3,331
  • 4
  • 35
  • 49
0
votes
1 answer

spring-data-redis with cacheManager

When I use spring-data-redis, it across two problems. The First problem is when I use cache annation to load data to redis, but I can not get the value by redisTemplate, the code as flows : @Bean RedisTemplate redisTemplate() { …
web david
  • 61
  • 2
  • 5
0
votes
0 answers

RedisCache.putIfAbsent is not setting the TTL on the element

I am using RedisCache.putIfAbsent operation of spring-data-redis-1.6.2.RELEASE.jar to set the element value atomically along with the ttl value. This is how I generate the Cache Manager instance public CacheManager dsyncCacheManager() { …
Bhaarat
  • 119
  • 2
  • 10
0
votes
1 answer

spring data redis / spring boot dependency mismatch?

I tried upgrading a Spring Boot application from spring-data-redis 1.6.4.RELEASE to 1.7.2.RELEASE by adding the spring-data-redis dependency to the POM whilst leaving the spring-boot-starter-redis unchanged (using Spring Boot 1.3.5.RELEASE). The…
0
votes
0 answers

Bugs about Spring Redis Template or Redis?

This issue almost driven me crazy! I use spring Redis template as the Redis client portal to manage my cache items in Redis. Recently I try to store some important data in it (expire time is about 60s) , but sometimes ( occasionally) it is deleted…
0
votes
1 answer

Cannot do Geo and Lrange in Spring Data Redis

Spring data redis doesn't seem to support the new geohash in Redis 3.2, also the template ops for list doesn't have a method to do lrange or essentially paginate the results.
F.O.O
  • 4,730
  • 4
  • 24
  • 34
0
votes
0 answers

Redis wipes out the data in it

Is there any reason why Redis is flusing all the data in it every day? I've installed the official docker image for Redis in one of my machines, put some data in it, but the day after it's all gone. The data is being saved through Spring Data Redis,…
Amin Abu-Taleb
  • 4,423
  • 6
  • 33
  • 50
0
votes
0 answers

Force bgSave() using Spring Data Redis

Is there any way to call bgSave() (force writing to disk) using Spring Data Redis Repositories? public interface UserRepository extends CrudRepository { } I've gone through the docs but I couldn't find any reference about bgSave().…
Amin Abu-Taleb
  • 4,423
  • 6
  • 33
  • 50
0
votes
2 answers

Prevent connection to Redis server in unit tests

I am building an app with spring-boot. In order to avoid sticky-session related problems, I put in place a redis session store by adding those lines in pom.xml : org.springframework.session
Arnaud Denoyelle
  • 29,980
  • 16
  • 92
  • 148
0
votes
3 answers

Calling @CacheEvict and @Cacheable annotation on a single method?

I'm trying to call @CacheEvict and @Cacheable annotation on a single method. @CacheEvict(value = "tripDetailsDashboardCache", key = "#userId") @Cacheable(value ="tripDetailsDashboardCache", key="#userId") public List
0
votes
1 answer

can't query a list in a spring-data-redis transaction

template.setEnableTransactionSupport(true); template.multi(); template.opsForValue().set("mykey", "Hello World"); List dataList = template.opsForList().range("mylist", 0, -1); template.exec(); Hi guys. I have a list…
Song Yang
  • 131
  • 1
  • 5
0
votes
0 answers

Cannot use Jedis when in Pipeline. Please use Pipeline or reset jedis state

I have trouble executing pipeline commands in spring data redis. I am using StringRedisTemplate. spring-data-redis 1.6.1, spring boot 1.3.2, and jedis both 2.7.3 and 2.8.0. The code: public void saveUserActivityEvents(Event... events) { …
clandestino_bgd
  • 143
  • 1
  • 2
  • 11
0
votes
1 answer

Spring and Redis queue listener with annotation

There is a way in Spring to configure Redis queue listeners using annotations? I would like something like Annotation-based SQS Queue Listener from Spring Cloud for AWS, but using Redis as a queue. Looking the documentation I can't find anything…