Skip to content

Instantly share code, notes, and snippets.

@hn-support
Last active March 20, 2017 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hn-support/2014db67fe4efbe58e787ecae5ea982d to your computer and use it in GitHub Desktop.
Save hn-support/2014db67fe4efbe58e787ecae5ea982d to your computer and use it in GitHub Desktop.
Setup redis sessions for Magento 2
'session' => array(
'save' => 'redis',
'redis' => array(
'host' => 'redismaster',
'port' => '6379',
'password' => '',
'timeout' => '2.5',
'persistent_identifier' => '',
'database' => '2',
'compression_threshold' => '2048',
'compression_library' => 'gzip',
'log_level' => '1',
'max_concurrency' => '6',
'break_after_frontend' => '5',
'break_after_adminhtml' => '30',
'first_lifetime' => '600',
'bot_first_lifetime' => '60',
'bot_lifetime' => '7200',
'disable_locking' => '0',
'min_lifetime' => '60',
'max_lifetime' => '2592000',
),
),
@mikebranderhorst
Copy link

Indent and comma like default

  'session' => 
  array (
    'save' => 'redis',
    'redis' => 
    array (
      'host' => 'redismaster',
      'port' => '6379',
      'password' => '',
      'timeout' => '2.5',
      'persistent_identifier' => '',
      'database' => '2',
      'compression_threshold' => '2048',
      'compression_library' => 'gzip',
      'log_level' => '1',
      'max_concurrency' => '6',
      'break_after_frontend' => '5',
      'break_after_adminhtml' => '30',
      'first_lifetime' => '600',
      'bot_first_lifetime' => '60',
      'bot_lifetime' => '7200',
      'disable_locking' => '0',
      'min_lifetime' => '60',
      'max_lifetime' => '2592000',
    ),
  ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment