Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow override Redis host/port/prefix via defines #152

Merged
merged 3 commits into from
Sep 20, 2018
Merged

Allow override Redis host/port/prefix via defines #152

merged 3 commits into from
Sep 20, 2018

Conversation

vincent-lu
Copy link
Contributor

The goal is to allow defining Redis cache's host/port/prefix without using nginx helper's settings backend page. The three defines are:

RT_WP_NGINX_HELPER_REDIS_HOSTNAME
RT_WP_NGINX_HELPER_REDIS_PORT
RT_WP_NGINX_HELPER_REDIS_PREFIX

If not defined, everything works as is (fallback to the settings stored in options, if empty, fallback to 127.0.0.1/6379/nginx-cache:

If defined, the input fields for the predefined redis settings are disabled, with note underneath to inform the user this field is overridden by defines.

Documentation (FAQ in README.md) is updated to reflect this feature.

The main benefit of this is in multiple server situations (production vs staging, load balanced servers, etc) you don't have to rely on database to inform nginx helper about where to find the redis server.

Thanks and please consider this PR.

@vincent-lu
Copy link
Contributor Author

Ping @chandrapatel , thanks for the great work, again.

@mbtamuli mbtamuli self-assigned this Aug 27, 2018
@mbtamuli
Copy link

Testing this PR.

@vincent-lu
Copy link
Contributor Author

Thanks @mbtamuli let me know if you have any suggestions for this PR.

@mbtamuli
Copy link

mbtamuli commented Sep 3, 2018

Tested this PR. This changes made in this PR works perfectly as intended.

@mbtamuli mbtamuli assigned chandrapatel and unassigned mbtamuli Sep 3, 2018
@chandrapatel chandrapatel self-requested a review September 20, 2018 12:41
@chandrapatel chandrapatel merged commit 9bb17c4 into rtCamp:master Sep 20, 2018
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.

3 participants