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.