From 449c24b774657abaa247a418c5d594771968619a Mon Sep 17 00:00:00 2001 From: Svetlin Kalendzhiev Date: Fri, 5 Mar 2021 13:12:54 +0000 Subject: [PATCH] ADHOC [feat] add redis compression lib By default even if compression is enabled nothing will be compressed because the default setting for compression library is empty. This commit adds a variable to set the compression library so that compression will actually work for real --- defaults/main.yml | 4 +++- templates/etc/env.php.j2 | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4b1b40a..0a770b5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -232,6 +232,7 @@ magento_x_frame_options: "SAMEORIGIN" # database: 1 # password: "" # compress_data: 1 +# compression_lib: "gzip" # auto_expire_lifetime: 604800 # auto_expire_pattern: /^.*/ @@ -243,7 +244,8 @@ magento_x_frame_options: "SAMEORIGIN" # port: 6379 # database: 0 # password: "" -# compress_data: "0" +# compress_data: 1 +# compression_lib: "gzip" # auto_expire_lifetime: 604800 # auto_expire_pattern: /^.*/ diff --git a/templates/etc/env.php.j2 b/templates/etc/env.php.j2 index 8fcf161..6a56aef 100644 --- a/templates/etc/env.php.j2 +++ b/templates/etc/env.php.j2 @@ -16,6 +16,7 @@ return array ( 'database' => '{{ magento_cache_frontend_default_backend_options.database }}', 'password' => '{{ magento_cache_frontend_default_backend_options.password }}', 'compress_data' => '{{ magento_cache_frontend_default_backend_options.compress_data }}', + 'compression_lib' => '{{ magento_cache_frontend_default_backend_options.compression_lib }}', 'auto_expire_lifetime' => '{{ magento_cache_frontend_default_backend_options.auto_expire_lifetime }}', 'auto_expire_pattern' => '{{ magento_cache_frontend_default_backend_options.auto_expire_pattern }}', ), @@ -32,6 +33,7 @@ return array ( 'database' => '{{ magento_cache_frontend_page_cache_backend_options.database }}', 'password' => '{{ magento_cache_frontend_page_cache_backend_options.password }}', 'compress_data' => '{{ magento_cache_frontend_page_cache_backend_options.compress_data }}', + 'compression_lib' => '{{ magento_cache_frontend_page_cache_backend_options.compression_lib }}', 'auto_expire_lifetime' => '{{ magento_cache_frontend_page_cache_backend_options.auto_expire_lifetime }}', 'auto_expire_pattern' => '{{ magento_cache_frontend_page_cache_backend_options.auto_expire_pattern }}', ),