elgentos / LargeConfigProducts

Large Configurable Products workaround for Magento 2
91 stars 28 forks source link

[Exception] No Redis configured as default cache frontend! #7

Closed rsulym closed 6 years ago

rsulym commented 6 years ago

Hi, after issue command php bin/magento lcp:prewarm getting error as in subject. I have Redis configured in file etc.php:

 array (
    'save' => 'redis',
    'redis' =>
    array (
      'host' => '127.0.0.1',
      'port' => '6379',
      'password' => '',
      'timeout' => '2.5',
      'persistent_identifier' => '',
      'database' => '2',
      'compression_threshold' => '2048',
      'compression_library' => 'gzip',
      'log_level' => '3',
      'max_concurrency' => '6',
      'break_after_frontend' => '5',
      'break_after_adminhtml' => '30',
      'first_lifetime' => '600',
      'bot_first_lifetime' => '60',
      'bot_lifetime' => '7200',
      'bot_first_lifetime' => '60',
      'bot_lifetime' => '7200',
      'disable_locking' => '0',
      'min_lifetime' => '60',
      'max_lifetime' => '2592000',
    ),
  ),
  'install' =>
  array (
    'date' => 'Mon, 18 Dec 2017 14:13:21 +0000',
  ),
  'cache_types' =>
  array (
    'compiled_config' => 1,
    'config' => 1,
    'layout' => 1,
    'block_html' => 1,
    'collections' => 1,
    'reflection' => 1,
    'db_ddl' => 1,
    'eav' => 1,
    'customer_notification' => 1,
    'full_page' => 1,
    'config_integration' => 1,
    'config_integration_api' => 1,
    'translate' => 1,
    'config_webservice' => 1,
  ),
  'system' =>
  array (
    'default' =>
    array (
      'dev' =>
      array (
        'debug' =>
        array (
          'debug_logging' => '0',
        ),
      ),
    ),
  ),
);

should it be configured in some special way?

peterjaap commented 6 years ago

I have it like this;

return array (
  'cache' => 
  array (
    'frontend' => 
    array (
      'default' => 
      array (
        'backend' => 'Cm_Cache_Backend_Redis',
        'backend_options' => 
        array (
          'server' => 'redis',
          'database' => '0',
          'port' => '6379',
        ),
      ),
      'page_cache' => 
      array (
        'backend' => 'Cm_Cache_Backend_Redis',
        'backend_options' => 
        array (
          'server' => 'redis',
          'port' => '6379',
          'database' => '1',
          'compress_data' => '0',
        ),
      ),
    ),
  ),
rsulym commented 6 years ago

thanks, adjusted like yours and it works!