Spring with Redis: cache manager, resolver and key generator
Spring provides a caching abstraction package spring-boot-starter-cache which basically provides method level annotations to cache data with @Cacheable, @Cacheput and other annotations. I feel there...
View ArticleIs there any multimap with different values of different object for one key...
My application requires a multivaluemap to store in redis cache with a key having 2 different objects saying object1 and object2. Map can return all the values or a single value based on type parameter...
View ArticleJedis - I am a little confused as to how I should use the configuration end...
So on the project I am currently working on we are making use of a redis cache on AWS, we had a AWS cluster mode disabled redis. Because of capacity we are going to transition to cluster mode enabled...
View ArticleHow do I connect to an AWS ElastiCache for Redis Cluster using Jedis?
Previously, we were using Redis with cluster mode disabled via AWS ElastiCache.Our Java code using Jedis was pointing to the primary single node endpoint, which was used for reads and writes.We've now...
View ArticleQuestion about transitioning from using Jedis and RedisTemplate to JedisCluster
Originally in our code we were using RedisTemplate in conjuction with JedisConnectionFactory and JedisPoolConfig (see below) as we were using a single node cluster mode disabled redis. @Bean(name =...
View ArticleWhat is the best redis lock implementation for highly volatile data with...
I want to implement a locking feature for the Redis cache in my java application, which deals with millions of writes/reads in a day. I see a lot of options available but I am unable to pick one...
View ArticleJedis keyspace notification event for "set" not working
So im trying to implement basic listener for when some value is set on redis, but when i set some value nothing happens and only expiry event gets called.Subscriberpublic class Subscriber { private...
View ArticleUsing JedisCluster with RedisTemplate in Spring
Originally in our code we were using RedisTemplate in conjuction with JedisConnectionFactory and JedisPoolConfig as we were using a Redis on a single node: @Bean(name = "redisTemplate") public...
View ArticleUnable to connect to redis sentinal in docker from my pc
i am running redis with sentinel in docker and I am not able to connect to my redis using the sentinel. This is my docker-compose file:version: '3'networks: app-tier: driver: bridgeservices: redis:...
View ArticleUsing mongo and redis cache with both repositories in Spring Boot
I want to use both Redis and Mongo with repository manner (I do not want to use spring cache annotations but repository methods).I annotate the main class with the following...
View ArticleStrange behaviour of Spring Cacheable returning null after the first call
I encouter a strange problem with one method.. no idea why this one, because it is the same as the other one..I'm using Redis for the cache, but redis doesn't return me the cached response after the...
View ArticleCould not get a resource from the pool(SocketTimeoutException:)
I'm running multiple worker threads(around 10) to access the data from the redis Q.For the i'm using infinte timeout for Jedis Client. Jedis jedis =...
View Articlewhy did i get redis command timeout when using brpop comand whose timeout...
I'm using redis list as a distributed blocking queue. On the client side, I use the following code:public String tryAquire(String appName, long timeout, TimeUnit timeUnit){ return...
View ArticleHow to map HSCAN response to Map using Vert.x Redis
I am using io.quarkus.redis.client.RedisClient which inside use Vert.x for a Redis Client in Java. When I use HSCAN method it return a list of key and values in differents rows like this:The keys are...
View ArticleClassCastException when loading from Redis Cache
I geta ClassCastException when reading a response from Redis Cache. Everything looks good when hitting the DB and store it in Redis Cache. The second read out of the Redis Cache terminates in a...
View ArticleHow to store and regenerate token that expires on Redis?
I am very new to using Redis.Usecase : EC2 Auto Scaling backendEach Instance -> checks token on Redis, if its not null and not expired, it will use that token for few API calls. -> if token is...
View ArticleDoes jedis have a method that can take a partial key and returns all the...
I have a requirement, where I have built up a key with two elementsclientid-systemid, using get, will return the value for that one key.I also have a requirement where using a partial key clientid. I...
View ArticleCan Make Redis server return NULL or False instead of JedisConnectionException?
We are developing an application that uses the Redis server as a cache server.So what We do are when a client request API it first go to Redis to get data if there is no data it returns null so the...
View ArticleScheduling asynchronous jobs with efficient round-robin algorithm using Redis
We are trying to redesign our microservice architecture-based application to support multiple tenants. We have a simple queue service that will be utilized by other services to queue any asynchronous...
View ArticleRedisson Hibernate 2L cache setup but always executes SQL query
I'm trying to setup Redisson Hibernate 2L caching but I'm seeing the hibernate query execute every time even though the results are clearly cached on my Redis instance.When debugging I can see it goes...
View Article