Skip to content

RedisConfigurationUtil #50

@tamershahin

Description

@tamershahin

I have some question about configureService method:

for each connection if port, host, etc that are not specified the code is using Redis defaults.

I would suggest to use the main values before cascading to default values, so plugin user doesn't have to replicate all data in each connections if the values are not the default one.

Let me write an example:

redis {
port = 9200
host = 'johnny'
timeout = 3000
password = ''
enabled = true
connections {
cache {
database = 1
}
}
}

with current code, for cache connection:
port=6379
database=1
host=localhost
timeout=2000

with the way i'm proposing:
port=9200
database=1
host='johnny'
timeout=3000

don't you think it's a more concise and intuitive way?
If you think it's a good suggestion I can update that bit of code and create a pull request to review.

T

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions