Questions tagged [redis-cache]

Redis is an open source (BSD licensed), in-memory data structure store, use this tag for specific cache usage

Redis is an open source (BSD licensed), in-memory data structure store, use this tag for specific cache usage.

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

Site: https://redis.io/

How to Use Azure Redis Cache: https://learn.microsoft.com/en-us/azure/redis-cache/cache-dotnet-how-to-use-azure-redis-cache

143 questions
3
votes
1 answer

Why error No connection is available to service this operation: SETEX while writing to Redis Cache in C# console application and how to solve it

I am trying to write records from a dictionary with around 5000 records to a Redis cache. But sometimes I get the below exception, I have no clue why I am getting this error, I have checked on the internet but could not find any solution or root…
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197
3
votes
3 answers

Implementing Queue with unique elements in Redis

I need to implement the Queue in Redis with unique elements. Currently, I am using the Redis List to implement Queue (LPUSH, RPOP) and Redis Sortedset/set to implement uniqueness. ` def push(key): if redis_cache.zadd('UNIQUE', key, 1): …
Rahul.Shikhare
  • 179
  • 1
  • 16
3
votes
1 answer

Symfony 4.3, tags:true option for redis cache pool does not implement TagAware ItemInterface

Using symfony 4.3, I have configured a cache pool that should enable TagAwarable for caching items. The configuration is like so: framework: cache: #app: cache.adapter.redis default_redis_provider:…
Ben C
  • 33
  • 1
  • 4
3
votes
1 answer

How to configure redis client in node js

I tried install redis client in system and run node js code its working fine. but I tried to redis client configure to set host and port in node js.but its not connected its throwing connection refused error.how to resolve it any one give…
Hari Smith
  • 143
  • 1
  • 9
3
votes
1 answer

How to clean redis cache through java program?

I have spring boot project. I am using redis as cache manager. I want to clear redis cache with java program. I want to call one api and it will clear my cache. I already know about redis-cli flushdb command. I am not expecting command line code.…
S Khandelwal
  • 199
  • 2
  • 13
3
votes
1 answer

How to get Long (data type) value back from redis cache

I am storing userId as Long in redis cache in my spring boot application but while retrieving it returns Integer type and throws exception java.lang.Integer cannot be cast to java.lang.Long Below is the code snippet I am using. @Cacheable(value =…
Sumit Sood
  • 441
  • 7
  • 23
3
votes
1 answer

Redis encoding of objects and the size impact

When I write some objects to redis I can get different memory usage stats. I want to understand how this happens. Simple example: 127.0.0.1:6379> set a 1 OK 127.0.0.1:6379> MEMORY usage a (integer) 49 127.0.0.1:6379> set a "1" OK 127.0.0.1:6379>…
Avba
  • 14,822
  • 20
  • 92
  • 192
3
votes
1 answer

Redis Cache - "Server Closed the connection" error

I was running some tests to understand the MaxMemory-Reserved & MaxMemory-Policy and we faced “Server Closed the connection” error few times when Redis DB was almost full. Here are the details: 1) Created the Redis Cache with Standard C1(1 GB) tier…
Pratik Mehta
  • 1,310
  • 4
  • 15
  • 37
3
votes
2 answers

How to handle non transient exception in Azure Worker role

We have two azure worker roles - A and B. A is a Quartz scheduler which runs jobs every minute. It reads some ids from a 'Redis cache' every minutes and execute jobs for those ids. 'A' publish its output to a service bus queue which…
3
votes
0 answers

Rescuing Redis Exception in Rails

I currently have a Rails 3.2.13 app using redis as its cache_store and for Sidekiq. I'm also using redis master-slave. I ran into an issue where during failover a slave would be in the process of becoming master, Rails then connected to this node…
Leo Correa
  • 19,131
  • 2
  • 53
  • 71
2
votes
0 answers

Does Redis cache supports Native sql Api

I am using apache ignite for my application now I wanted to migrate to redis-cache but I used ignite query api to fetch data. Is there any possible way I can use the same queries just by changing dependencies from ignite to redis-cache? Is there any…
Vital
  • 21
  • 1
2
votes
0 answers

django 3.0.2 get_cache_key returns different cache keys

I'm trying to invalidate a view following this Expire a view-cache in Django?. Here's a view function where I have disabled per-site caching and enabled per-view caching. This is the view, say, that I need to…
Azima
  • 3,835
  • 15
  • 49
  • 95
2
votes
0 answers

Redis Cache Pool: How to validate if redis pooling configuration is working?

Folks, I have a redis cache connection for my application. Which recently got stalled due to connections increase. So I have implimented connection pooling for my redis connection in my application. The configuration is as…
Jake
  • 391
  • 1
  • 4
  • 22
2
votes
0 answers

How do I find the eviction rate of keys in redis?

My redis cluster is configured with maxmem. The eviction policy is allkeys-lru. I want to know how long the keys are lasting on average before they are evicted. Every time a key is evicted, doesn't redis capture how long it lived for? I was…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
2
votes
1 answer

How to set max number of entries for different caches in the Redis cache manager in spring boot application?

In a Spring Boot app I'm doing the migration from a local cache implemented with Caffeine to a Redis distributed cache. I see in Caffeine cache that we can set the maximum number of entries Cache cache = new CaffeineCache(cacheName,…
Vitalii
  • 10,091
  • 18
  • 83
  • 151
1
2
3
9 10