Skip to content

Queries regarding distributed external cache (Redis) utilizing multiple Ocelot nodes #2144

Answered by raman-m
SheruGaur asked this question in Q&A
Discussion options

You must be logged in to vote

Redis Configuration code in program.cs

services.AddOcelot()
 .AddCacheManager(x => x.WithDictionaryHandle())
 .AddCacheManager(x =>
 {
     var redisSettings = configuration.GetSection("RedisSettings");
     // ...
 })

Why did you set up twice? You should call the method only once!

P.S.

I advise against a hybrid setup such as CacheManager + Redis. CacheManager should only be used for memory caching. We have been using the CacheManager.Core package since 2019, but it appears to be deprecated, with the last version being 2.0.0-beta-1629, released on November 15, 2018. Additionally, the most recent repository release is 1.2.0 , dated December 6, 2018, which is quite outdated.

P.P.S.

@Sheru…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@raman-m
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Caching Ocelot feature: Caching Configuration Ocelot feature: Configuration
2 participants