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 timeout to be set via CACHE_TIMEOUT env var. #467

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EarthlingDavey
Copy link
Contributor

No description provided.

@EarthlingDavey EarthlingDavey requested a review from a team as a code owner September 20, 2024 08:57
@@ -1258,6 +1261,7 @@ public function build_client_parameters( $redis_server ) {
// @phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
'auth' => ! empty( $_SERVER['CACHE_PASSWORD'] ) ? $_SERVER['CACHE_PASSWORD'] : null,
'database' => ! empty( $_SERVER['CACHE_DB'] ) ? intval( $_SERVER['CACHE_DB'] ) : $database,
'timeout' => isset( $_SERVER['CACHE_TIMEOUT'] ) ? intval( $_SERVER['CACHE_TIMEOUT'] ) : $timeout,
Copy link
Member

Choose a reason for hiding this comment

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

This check's current position in the Pantheon config conditional is a problem, as it only would get used if config set by the Pantheon env exists (CACHE_HOST et.al). Since this is not a config value Pantheon envs set, better to move it outside of the current block (probably up at 1250?) making this more portable.

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