Thứ Hai, 11 tháng 11, 2019

Install Redis configuration in magento 2.3



1: Install Redis:

 sudo add-apt-repository ppa:chris-lea/redis-server  
 sudo apt-get update  
 sudo apt-get install redis-server  

2: open file app/etc/env.php then insert following codes before the last line:

 'cache' =>  
  array (  
   'frontend' =>  
   array (  
    'default' =>  
    array (  
     'backend' => 'Cm_Cache_Backend_Redis',  
     'backend_options' =>  
     array (  
      'server' => '127.0.0.1',  
      'port' => '6379',  
      'persistent' => '',  
      'database' => '0',  
      'force_standalone' => '0',  
      'connect_retries' => '1',  
      'read_timeout' => '10',  
      'automatic_cleaning_factor' => '0',  
      'compress_data' => '1',  
      'compress_tags' => '1',  
      'compress_threshold' => '20480',  
      'compression_lib' => 'gzip',  
     ),  
    ),  
    'page_cache' =>  
    array (  
     'backend' => 'Cm_Cache_Backend_Redis',  
     'backend_options' =>  
     array (  
      'server' => '127.0.0.1',  
      'port' => '6379',  
      'persistent' => '',  
      'database' => '1',  
      'force_standalone' => '0',  
      'connect_retries' => '1',  
      'read_timeout' => '10',  
      'automatic_cleaning_factor' => '0',  
      'compress_data' => '0',  
      'compress_tags' => '1',  
      'compress_threshold' => '20480',  
      'compression_lib' => 'gzip',  
     ),  
    ),  
   ),  
  ),  

*Restart Redis by using command:

 sudo service redis-server restart  

Check the status of Redis server in your Magento 2 store by command:

  sudo redis-cli info.   

If you see the # Keyspace, the Redis server is working fine or else check your configuration.
If you want to flush Redis cache, use command:

 sudo redis-cli flushdb  

Không có nhận xét nào:

Đăng nhận xét

About me

Recent

recentposts

Random

randomposts