From 55a5631cbb14be127602566d51647b15df298ce7 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Tue, 20 Aug 2024 16:40:35 +0530 Subject: [PATCH 01/11] feat: add filter to set the cache path for nginx. --- includes/class-nginx-helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/class-nginx-helper.php b/includes/class-nginx-helper.php index f96e6d0..0460914 100644 --- a/includes/class-nginx-helper.php +++ b/includes/class-nginx-helper.php @@ -85,7 +85,8 @@ public function __construct() { } if ( ! defined( 'RT_WP_NGINX_HELPER_CACHE_PATH' ) ) { - define( 'RT_WP_NGINX_HELPER_CACHE_PATH', '/var/run/nginx-cache' ); + $cache_path = apply_filters( 'rt_wp_nginx_helper_cache_path', '/var/run/nginx-cache' ); + define( 'RT_WP_NGINX_HELPER_CACHE_PATH', $cache_path ); } $this->load_dependencies(); From 367d97c09add545f4efe569df6f1eb82243baec3 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Thu, 5 Sep 2024 13:42:58 +0530 Subject: [PATCH 02/11] feat: add input element to accept redis database. --- admin/partials/nginx-helper-general-options.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/admin/partials/nginx-helper-general-options.php b/admin/partials/nginx-helper-general-options.php index a91eb53..af14488 100644 --- a/admin/partials/nginx-helper-general-options.php +++ b/admin/partials/nginx-helper-general-options.php @@ -22,6 +22,7 @@ 'redis_hostname', 'redis_port', 'redis_prefix', + 'redis_database', 'purge_homepage_on_edit', 'purge_homepage_on_del', 'purge_url', @@ -288,6 +289,21 @@ ?> + + + + /> + '; + esc_html_e( 'Overridden by constant variables.', 'nginx-helper' ); + echo '

'; + + } + ?> + + From 14eca80cd6cd4e36c69c7dd9644af2679f041c1c Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Thu, 5 Sep 2024 13:43:26 +0530 Subject: [PATCH 03/11] feat: add database while connecting to redis. --- admin/class-nginx-helper-admin.php | 3 +++ admin/class-phpredis-purger.php | 4 ++++ admin/class-predis-purger.php | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index f91289a..2aff242 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -276,6 +276,7 @@ public function nginx_helper_default_settings() { 'redis_hostname' => '127.0.0.1', 'redis_port' => '6379', 'redis_prefix' => 'nginx-cache:', + 'redis_database' => 0, 'purge_url' => '', 'redis_enabled_by_constant' => 0, ); @@ -295,6 +296,7 @@ public function nginx_helper_settings() { 'redis_hostname' => '127.0.0.1', 'redis_port' => '6379', 'redis_prefix' => 'nginx-cache:', + 'redis_database' => 0, ) ); @@ -319,6 +321,7 @@ public function nginx_helper_settings() { $data['redis_hostname'] = RT_WP_NGINX_HELPER_REDIS_HOSTNAME; $data['redis_port'] = RT_WP_NGINX_HELPER_REDIS_PORT; $data['redis_prefix'] = RT_WP_NGINX_HELPER_REDIS_PREFIX; + $data['redis_database'] = defined('RT_WP_NGINX_HELPER_REDIS_DATABASE') ? RT_WP_NGINX_HELPER_REDIS_DATABASE : 0; return $data; diff --git a/admin/class-phpredis-purger.php b/admin/class-phpredis-purger.php index 10a8483..8aa7669 100644 --- a/admin/class-phpredis-purger.php +++ b/admin/class-phpredis-purger.php @@ -44,6 +44,10 @@ public function __construct() { $nginx_helper_admin->options['redis_port'], 5 ); + + if( $nginx_helper_admin->options['redis_database'] !== 0 ) { + $this->redis_object->select($nginx_helper_admin->options['redis_database']); + } } catch ( Exception $e ) { $this->log( $e->getMessage(), 'ERROR' ); diff --git a/admin/class-predis-purger.php b/admin/class-predis-purger.php index 1290a0d..0fb99a7 100644 --- a/admin/class-predis-purger.php +++ b/admin/class-predis-purger.php @@ -41,8 +41,9 @@ public function __construct() { // redis server parameter. $this->redis_object = new Predis\Client( array( - 'host' => $nginx_helper_admin->options['redis_hostname'], - 'port' => $nginx_helper_admin->options['redis_port'], + 'host' => $nginx_helper_admin->options['redis_hostname'], + 'port' => $nginx_helper_admin->options['redis_port'], + 'database' => $nginx_helper_admin->options['redis_database'], ) ); From 8c58de3f6302a41db40abac817183a61b1792af7 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Thu, 5 Sep 2024 17:27:38 +0530 Subject: [PATCH 04/11] feat: modify the redis database selection. --- admin/class-predis-purger.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/class-predis-purger.php b/admin/class-predis-purger.php index 0fb99a7..9fffe5b 100644 --- a/admin/class-predis-purger.php +++ b/admin/class-predis-purger.php @@ -41,11 +41,14 @@ public function __construct() { // redis server parameter. $this->redis_object = new Predis\Client( array( - 'host' => $nginx_helper_admin->options['redis_hostname'], - 'port' => $nginx_helper_admin->options['redis_port'], - 'database' => $nginx_helper_admin->options['redis_database'], + 'host' => $nginx_helper_admin->options['redis_hostname'], + 'port' => $nginx_helper_admin->options['redis_port'], ) ); + + if( $nginx_helper_admin->options['redis_database'] !== 0 ) { + $this->redis_object->select($nginx_helper_admin->options['redis_database']); + } try { $this->redis_object->connect(); From 2258c1ac1fddcb32950bbb0fb19f956347369b94 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Thu, 5 Sep 2024 17:49:06 +0530 Subject: [PATCH 05/11] feat: add acl support for redis. --- admin/class-nginx-helper-admin.php | 2 ++ admin/class-phpredis-purger.php | 16 ++++++++- admin/class-predis-purger.php | 5 +++ .../partials/nginx-helper-general-options.php | 34 +++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index 2aff242..8def3cc 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -277,6 +277,8 @@ public function nginx_helper_default_settings() { 'redis_port' => '6379', 'redis_prefix' => 'nginx-cache:', 'redis_database' => 0, + 'redis_username' => '', + 'redis_password' => '', 'purge_url' => '', 'redis_enabled_by_constant' => 0, ); diff --git a/admin/class-phpredis-purger.php b/admin/class-phpredis-purger.php index 8aa7669..761d67d 100644 --- a/admin/class-phpredis-purger.php +++ b/admin/class-phpredis-purger.php @@ -39,10 +39,24 @@ public function __construct() { try { $this->redis_object = new Redis(); + + $redis_acl = array(); + + $username = $nginx_helper_admin->options['redis_username']; + $password = $nginx_helper_admin->options['redis_password']; + + if( $username && $password ) { + $redis_acl['auth'] = array( $username, $password ); + } + $this->redis_object->connect( $nginx_helper_admin->options['redis_hostname'], $nginx_helper_admin->options['redis_port'], - 5 + 5, + null, + 0, + 0, + $redis_acl ); if( $nginx_helper_admin->options['redis_database'] !== 0 ) { diff --git a/admin/class-predis-purger.php b/admin/class-predis-purger.php index 9fffe5b..ea64d50 100644 --- a/admin/class-predis-purger.php +++ b/admin/class-predis-purger.php @@ -37,12 +37,17 @@ public function __construct() { } Predis\Autoloader::register(); + + $username = $nginx_helper_admin->options['redis_username']; + $password = $nginx_helper_admin->options['redis_password']; // redis server parameter. $this->redis_object = new Predis\Client( array( 'host' => $nginx_helper_admin->options['redis_hostname'], 'port' => $nginx_helper_admin->options['redis_port'], + 'username' => $username, + 'password' => $password, ) ); diff --git a/admin/partials/nginx-helper-general-options.php b/admin/partials/nginx-helper-general-options.php index af14488..722dedd 100644 --- a/admin/partials/nginx-helper-general-options.php +++ b/admin/partials/nginx-helper-general-options.php @@ -23,6 +23,8 @@ 'redis_port', 'redis_prefix', 'redis_database', + 'redis_username', + 'redis_password', 'purge_homepage_on_edit', 'purge_homepage_on_del', 'purge_url', @@ -304,6 +306,38 @@ ?> + + + + + /> + '; + esc_html_e( 'Overridden by constant variables.', 'nginx-helper' ); + echo '

'; + + } + ?> + + + + + + + /> + '; + esc_html_e( 'Overridden by constant variables.', 'nginx-helper' ); + echo '

'; + + } + ?> + + From e489543b3637ce7a509cc92b05eb5c8bc1ab990d Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Fri, 6 Sep 2024 12:07:34 +0530 Subject: [PATCH 06/11] feat: add unix socket. --- admin/class-nginx-helper-admin.php | 23 ++++++---- admin/class-phpredis-purger.php | 7 +++- admin/class-predis-purger.php | 25 +++++++---- .../partials/nginx-helper-general-options.php | 42 +++++++++++++++++-- 4 files changed, 75 insertions(+), 22 deletions(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index 8def3cc..4235924 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -276,11 +276,14 @@ public function nginx_helper_default_settings() { 'redis_hostname' => '127.0.0.1', 'redis_port' => '6379', 'redis_prefix' => 'nginx-cache:', + 'redis_unix_socket' => '', 'redis_database' => 0, 'redis_username' => '', 'redis_password' => '', 'purge_url' => '', 'redis_enabled_by_constant' => 0, + 'redis_socket_enabled_by_constant' => 0, + 'redis_acl_enabled_by_constant' => 0, ); } @@ -312,18 +315,24 @@ public function nginx_helper_settings() { defined( 'RT_WP_NGINX_HELPER_REDIS_PORT' ) && defined( 'RT_WP_NGINX_HELPER_REDIS_PREFIX' ) ); + + $data['redis_acl_enabled_by_constant'] = defined('RT_WP_NGINX_HELPER_REDIS_USERNAME') && defined('RT_WP_NGINX_HELPER_REDIS_PASSWORD'); + $data['redis_socket_enabled_by_constant'] = defined('RT_WP_NGINX_HELPER_REDIS_UNIX_SOCKET'); + $data['redis_unix_socket'] = $data['redis_socket_enabled_by_constant'] ? RT_WP_NGINX_HELPER_REDIS_UNIX_SOCKET : $data['redis_unix_socket']; + $data['redis_username'] = $data['redis_acl_enabled_by_constant'] ? RT_WP_NGINX_HELPER_REDIS_USERNAME : $data['redis_username']; + $data['redis_password'] = $data['redis_acl_enabled_by_constant'] ? RT_WP_NGINX_HELPER_REDIS_PASSWORD : $data['redis_password']; if ( ! $is_redis_enabled ) { return $data; } - $data['redis_enabled_by_constant'] = $is_redis_enabled; - $data['enable_purge'] = $is_redis_enabled; - $data['cache_method'] = 'enable_redis'; - $data['redis_hostname'] = RT_WP_NGINX_HELPER_REDIS_HOSTNAME; - $data['redis_port'] = RT_WP_NGINX_HELPER_REDIS_PORT; - $data['redis_prefix'] = RT_WP_NGINX_HELPER_REDIS_PREFIX; - $data['redis_database'] = defined('RT_WP_NGINX_HELPER_REDIS_DATABASE') ? RT_WP_NGINX_HELPER_REDIS_DATABASE : 0; + $data['redis_enabled_by_constant'] = $is_redis_enabled; + $data['enable_purge'] = $is_redis_enabled; + $data['cache_method'] = 'enable_redis'; + $data['redis_hostname'] = RT_WP_NGINX_HELPER_REDIS_HOSTNAME; + $data['redis_port'] = RT_WP_NGINX_HELPER_REDIS_PORT; + $data['redis_prefix'] = RT_WP_NGINX_HELPER_REDIS_PREFIX; + $data['redis_database'] = defined('RT_WP_NGINX_HELPER_REDIS_DATABASE') ? RT_WP_NGINX_HELPER_REDIS_DATABASE : 0; return $data; diff --git a/admin/class-phpredis-purger.php b/admin/class-phpredis-purger.php index 761d67d..d4b0f95 100644 --- a/admin/class-phpredis-purger.php +++ b/admin/class-phpredis-purger.php @@ -49,9 +49,12 @@ public function __construct() { $redis_acl['auth'] = array( $username, $password ); } + $hostname = empty( $nginx_helper_admin->options['redis_unix_socket'] ) ? $nginx_helper_admin->options['redis_hostname'] : $nginx_helper_admin->options['redis_unix_socket']; + $port = empty( $nginx_helper_admin->options['redis_unix_socket'] ) ? $nginx_helper_admin->options['redis_port'] : 0; + $this->redis_object->connect( - $nginx_helper_admin->options['redis_hostname'], - $nginx_helper_admin->options['redis_port'], + $hostname, + $port, 5, null, 0, diff --git a/admin/class-predis-purger.php b/admin/class-predis-purger.php index ea64d50..bf38bb1 100644 --- a/admin/class-predis-purger.php +++ b/admin/class-predis-purger.php @@ -38,18 +38,25 @@ public function __construct() { Predis\Autoloader::register(); + $predis_args = array(); + $username = $nginx_helper_admin->options['redis_username']; $password = $nginx_helper_admin->options['redis_password']; - + + if( empty( $nginx_helper_admin->options['redis_unix_socket'] ) ) { + $predis_args['path'] = $nginx_helper_admin->options['redis_unix_socket']; + } else { + $predis_args['host'] = $nginx_helper_admin->options['redis_hostname'];; + $predis_args['port'] = $nginx_helper_admin->options['redis_port']; + } + + if ( $username && $password ) { + $predis_args['username'] = $username; + $predis_args['password'] = $password; + } + // redis server parameter. - $this->redis_object = new Predis\Client( - array( - 'host' => $nginx_helper_admin->options['redis_hostname'], - 'port' => $nginx_helper_admin->options['redis_port'], - 'username' => $username, - 'password' => $password, - ) - ); + $this->redis_object = new Predis\Client( $predis_args ); if( $nginx_helper_admin->options['redis_database'] !== 0 ) { $this->redis_object->select($nginx_helper_admin->options['redis_database']); diff --git a/admin/partials/nginx-helper-general-options.php b/admin/partials/nginx-helper-general-options.php index 722dedd..485a759 100644 --- a/admin/partials/nginx-helper-general-options.php +++ b/admin/partials/nginx-helper-general-options.php @@ -25,6 +25,9 @@ 'redis_database', 'redis_username', 'redis_password', + 'redis_unix_socket', + 'redis_socket_enabled_by_constant', + 'redis_acl_enabled_by_constant', 'purge_homepage_on_edit', 'purge_homepage_on_del', 'purge_url', @@ -249,7 +252,7 @@ - /> + /> + '; + esc_html_e( 'Overridden by unix socket path.', 'nginx-helper' ); + echo '

'; + } + ?> - /> + /> + '; + esc_html_e( 'Overridden by unix socket path.', 'nginx-helper' ); + echo '

'; + + } + ?> + + + + /> + '; + esc_html_e( 'Overridden by constant variables.', 'nginx-helper' ); + echo '

'; + + } + ?> + + @@ -308,7 +342,7 @@ - + /> - + /> Date: Fri, 6 Sep 2024 12:18:20 +0530 Subject: [PATCH 07/11] remove: extra filters. --- includes/class-nginx-helper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/class-nginx-helper.php b/includes/class-nginx-helper.php index 0460914..f96e6d0 100644 --- a/includes/class-nginx-helper.php +++ b/includes/class-nginx-helper.php @@ -85,8 +85,7 @@ public function __construct() { } if ( ! defined( 'RT_WP_NGINX_HELPER_CACHE_PATH' ) ) { - $cache_path = apply_filters( 'rt_wp_nginx_helper_cache_path', '/var/run/nginx-cache' ); - define( 'RT_WP_NGINX_HELPER_CACHE_PATH', $cache_path ); + define( 'RT_WP_NGINX_HELPER_CACHE_PATH', '/var/run/nginx-cache' ); } $this->load_dependencies(); From efd7da469a99e88e990c5076fac5f71e692e3a98 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Wed, 16 Oct 2024 16:16:42 +0530 Subject: [PATCH 08/11] feat: add password toggle button. --- admin/css/nginx-helper-admin.css | 17 ++++- admin/js/nginx-helper-admin.js | 13 ++++ .../partials/nginx-helper-general-options.php | 64 ++++++++++--------- 3 files changed, 62 insertions(+), 32 deletions(-) diff --git a/admin/css/nginx-helper-admin.css b/admin/css/nginx-helper-admin.css index 0a8856b..ddf47ce 100644 --- a/admin/css/nginx-helper-admin.css +++ b/admin/css/nginx-helper-admin.css @@ -4,7 +4,7 @@ */ .clearfix { - *zoom: 1; + zoom: 1; } .clearfix:before, .clearfix:after { @@ -103,3 +103,18 @@ form#purgeall .button-primary:focus { font-size: 13px; margin-left: 23px; } + +.password-input { + padding-right: 40px; +} + +.password-show-hide-btn { + background-color: transparent; + border: 0; + cursor: pointer; + display: inline-block; +} + +.password-wrapper { + display: flex; +} diff --git a/admin/js/nginx-helper-admin.js b/admin/js/nginx-helper-admin.js index 4b3aa00..748ac70 100644 --- a/admin/js/nginx-helper-admin.js +++ b/admin/js/nginx-helper-admin.js @@ -75,6 +75,19 @@ } ); + jQuery('.password-show-hide-btn').on('click', function() { + var passwordInput = $(this).siblings('.password-input'); + var icon = $(this).find('.password-input-icon'); + + if (passwordInput.attr('type') === 'password') { + passwordInput.attr('type', 'text'); + icon.removeClass('dashicons-hidden').addClass('dashicons-visibility'); + } else { + passwordInput.attr('type', 'password'); + icon.removeClass('dashicons-visibility').addClass('dashicons-hidden'); + } + }); + /** * Show OR Hide options on option checkbox * diff --git a/admin/partials/nginx-helper-general-options.php b/admin/partials/nginx-helper-general-options.php index 485a759..61075b0 100644 --- a/admin/partials/nginx-helper-general-options.php +++ b/admin/partials/nginx-helper-general-options.php @@ -22,12 +22,12 @@ 'redis_hostname', 'redis_port', 'redis_prefix', - 'redis_database', - 'redis_username', - 'redis_password', - 'redis_unix_socket', - 'redis_socket_enabled_by_constant', - 'redis_acl_enabled_by_constant', + 'redis_database', + 'redis_username', + 'redis_password', + 'redis_unix_socket', + 'redis_socket_enabled_by_constant', + 'redis_acl_enabled_by_constant', 'purge_homepage_on_edit', 'purge_homepage_on_del', 'purge_url', @@ -295,10 +295,10 @@ ?> - - - - /> + + + + /> - - + + @@ -325,10 +325,10 @@ ?> - - - - /> + + + + /> - - + + - - - - /> + + + + /> - - + + - - - - /> + + + +
+ /> + +
'; esc_html_e( 'Overridden by constant variables.', 'nginx-helper' ); echo '

'; } ?> - - + + From cd58a27c01db46f79daa94e4e2d1ad50570d27ea Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Wed, 16 Oct 2024 16:29:09 +0530 Subject: [PATCH 09/11] refactor: fix indentation. --- admin/class-nginx-helper-admin.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index 4235924..2def2bd 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -275,15 +275,15 @@ public function nginx_helper_default_settings() { 'purge_feeds' => 1, 'redis_hostname' => '127.0.0.1', 'redis_port' => '6379', - 'redis_prefix' => 'nginx-cache:', - 'redis_unix_socket' => '', - 'redis_database' => 0, - 'redis_username' => '', - 'redis_password' => '', + 'redis_prefix' => 'nginx-cache:', + 'redis_unix_socket' => '', + 'redis_database' => 0, + 'redis_username' => '', + 'redis_password' => '', 'purge_url' => '', 'redis_enabled_by_constant' => 0, - 'redis_socket_enabled_by_constant' => 0, - 'redis_acl_enabled_by_constant' => 0, + 'redis_socket_enabled_by_constant' => 0, + 'redis_acl_enabled_by_constant' => 0, ); } @@ -331,8 +331,8 @@ public function nginx_helper_settings() { $data['cache_method'] = 'enable_redis'; $data['redis_hostname'] = RT_WP_NGINX_HELPER_REDIS_HOSTNAME; $data['redis_port'] = RT_WP_NGINX_HELPER_REDIS_PORT; - $data['redis_prefix'] = RT_WP_NGINX_HELPER_REDIS_PREFIX; - $data['redis_database'] = defined('RT_WP_NGINX_HELPER_REDIS_DATABASE') ? RT_WP_NGINX_HELPER_REDIS_DATABASE : 0; + $data['redis_prefix'] = RT_WP_NGINX_HELPER_REDIS_PREFIX; + $data['redis_database'] = defined('RT_WP_NGINX_HELPER_REDIS_DATABASE') ? RT_WP_NGINX_HELPER_REDIS_DATABASE : 0; return $data; From 910b9125621351cb46887533bd1c8c2a7ea5b270 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Thu, 12 Dec 2024 14:02:31 +0530 Subject: [PATCH 10/11] fix: bug causing the predis instance to crash if db was pre-selected. --- admin/class-predis-purger.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/class-predis-purger.php b/admin/class-predis-purger.php index bf38bb1..7f007b4 100644 --- a/admin/class-predis-purger.php +++ b/admin/class-predis-purger.php @@ -57,15 +57,16 @@ public function __construct() { // redis server parameter. $this->redis_object = new Predis\Client( $predis_args ); - - if( $nginx_helper_admin->options['redis_database'] !== 0 ) { - $this->redis_object->select($nginx_helper_admin->options['redis_database']); - } try { $this->redis_object->connect(); } catch ( Exception $e ) { $this->log( $e->getMessage(), 'ERROR' ); + return; + } + + if( $nginx_helper_admin->options['redis_database'] !== 0 ) { + $this->redis_object->select($nginx_helper_admin->options['redis_database']); } } From 9dea716221c28d38229e30b9c91c63cbaf6ed7c7 Mon Sep 17 00:00:00 2001 From: Vedant Gandhi Date: Thu, 12 Dec 2024 14:29:53 +0530 Subject: [PATCH 11/11] feat: add indentation for redis databse value. --- admin/class-nginx-helper-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index d2147bb..a398714 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -331,7 +331,7 @@ public function nginx_helper_settings() { 'redis_hostname' => '127.0.0.1', 'redis_port' => '6379', 'redis_prefix' => 'nginx-cache:', - 'redis_database' => 0, + 'redis_database' => 0, ) );