Pages

01 October, 2024

Sitecore Commerce - Refresh Commerce Cache - This operation is not available unless admin mode is enabled: FLUSHDB

In one of the eCommerce application, Sitecore Commerce 10.1.1 is being used. After few infrastructure consolidation, testing out Refresh Commerce Cache option in CM resulted in the below error. 

ManagedPoolThread #13 07:22:05 ERROR CommerceRedisCacheStore: Error with connection to redis trying to clear all cache keys: StackExchange.Redis.RedisCommandException: This operation is not available unless admin mode is enabled: FLUSHDB
at StackExchange.Redis.ConnectionMultiplexer.CheckMessage(Message message) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 527
at StackExchange.Redis.RedisServer.ExecuteSync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in /_/src/StackExchange.Redis/RedisServer.cs:line 602
at Sitecore.Commerce.Engine.Connect.CommerceRedisCacheStore.ClearAllKeys()
Based on the exception, we found that we can add AllowAdmin option to the Sitecore Commerce Redis Connection string. All Commerce related settings are available in this folder - \App_Config\Include\Y.Commerce.Engine.

In Sitecore.Commerce.Engine.Connect.config, allowAdmin=true configuration is added to the Redis Connection string. Refreshing the commerce cache worked without an error. 



No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }