Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions packages/webentor-starter/config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,16 @@
/**
* REDIS CLIENT
*/
Config::define('WP_REDIS_HOST', env('REDIS_HOST') ?? '');
Config::define('WP_REDIS_PORT', env('REDIS_PORT') ?? '');
// Only override when set: empty strings beat the drop-in's 127.0.0.1:6379 defaults, and phpredis needs an int port
if (env('REDIS_HOST')) {
Config::define('WP_REDIS_HOST', env('REDIS_HOST'));
}
if (env('REDIS_PORT')) {
Config::define('WP_REDIS_PORT', (int) env('REDIS_PORT'));
}
Config::define('WP_REDIS_DISABLED', env('WP_REDIS_DISABLED'));
// Default on: sites often share one Redis db, where a full flush would wipe every site's cache
Config::define('WP_REDIS_SELECTIVE_FLUSH', env('WP_REDIS_SELECTIVE_FLUSH') ?? true);

/**
* Define SENTRY vars.
Expand Down
11 changes: 9 additions & 2 deletions test-site/config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,16 @@
/**
* REDIS CLIENT
*/
Config::define('WP_REDIS_HOST', env('REDIS_HOST') ?? '');
Config::define('WP_REDIS_PORT', env('REDIS_PORT') ?? '');
// Only override when set: empty strings beat the drop-in's 127.0.0.1:6379 defaults, and phpredis needs an int port
if (env('REDIS_HOST')) {
Config::define('WP_REDIS_HOST', env('REDIS_HOST'));
}
if (env('REDIS_PORT')) {
Config::define('WP_REDIS_PORT', (int) env('REDIS_PORT'));
}
Config::define('WP_REDIS_DISABLED', env('WP_REDIS_DISABLED'));
// Default on: sites often share one Redis db, where a full flush would wipe every site's cache
Config::define('WP_REDIS_SELECTIVE_FLUSH', env('WP_REDIS_SELECTIVE_FLUSH') ?? true);

/**
* Define SENTRY vars.
Expand Down
Loading