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

Conversation

Projects
None yet
3 participants
@vincent-lu
Copy link
Contributor

commented Aug 10, 2018

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

This comment has been minimized.

Copy link
Contributor Author

commented Aug 10, 2018

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

@mbtamuli mbtamuli self-assigned this Aug 27, 2018

@mbtamuli

This comment has been minimized.

Copy link
Collaborator

commented Aug 27, 2018

Testing this PR.

@vincent-lu

This comment has been minimized.

Copy link
Contributor Author

commented Aug 31, 2018

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

@mbtamuli

This comment has been minimized.

Copy link
Collaborator

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 Sep 20, 2018

@chandrapatel chandrapatel merged commit 9bb17c4 into rtCamp:master Sep 20, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
WIP ready for review
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.