Skip to content

Conversation

locnguyen1986
Copy link
Contributor

As our dev is using Cluster.
I switch the connections type to support both single and cluster Redis server

func NewRedisCacheService() *RedisCacheService {
redisURL := environment_variables.EnvironmentVariables.REDIS_URL
if redisURL == "" {
panic("REDIS_URL environment variable must be set")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed this. If you have a moment, please make NewRedisCacheService() return an error. If NewRedisCacheService() returns an error, panic with that error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me return err

@locnguyen1986 locnguyen1986 merged commit 8eeaf70 into main Sep 29, 2025
1 check passed
@locnguyen1986 locnguyen1986 deleted the add-redis-universal-connections branch September 29, 2025 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants