Allow memcached host and port to be configured via .env#969
Merged
Conversation
The memcached cache store had its host and port hardcoded to
127.0.0.1:11211, unlike Redis which already reads from env vars
in config/database.php. This makes it impossible to use memcached
running on a separate host (e.g. in a Docker container) without
modifying config/cache.php directly.
Read MEMCACHED_HOST and MEMCACHED_PORT from the environment with
the existing values as defaults, matching the convention used by
the Redis configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[BF] Summary of fix - fixes [inex]/IXP-Manager#968
Problem Statement: Memcached is currently hard coded to 127.0.0.1:11211.
Change: Add env value (with defaults matching existing behaviour), this allows the ability to move it either inside a docker container, or another box / cluster
Risk/Reward: Low risk, as default values that match existing behaviour can be passed.