Stratus Guides - Session Cache Configuration

Since all Magento stores on STRATUS are required to use cache for session storage, STRATUS provides the means of using either Redis or Memcache for caching sessions.

NOTE: All Magento stores on STRATUS are required to use either Redis (recommended) or Memcache for session storage. Sessions cannot be stored in files nor in the database. See Magento Requirements for the full list of requirements.


Redis can be enabled, disabled, or flushed in the [Redis > Config Cache][2] STRATUS Control panel.

Using CLI commands:

  • To view: redis-cli -h redis-session info | tail -4
  • To flush sessions: redis-cli -h redis-session -p 6380 FLUSHALL

NOTE: Sessions do NOT clear with the /usr/share/stratus/cli cache.all.clear command nor do they clear during a redeploy.

Magento 1

To configure Magento 1 for using Redis:

  1. Enable the Cm_RedisSession module. * Open app/etc/modules/Cm_RedisSession.xml. * Change “false” to “true”. * If this file does not exist, it must be installed for the Redis module to work properly.
  2. Edit the “session” block in local.xml:

Magento 2

There are two methods to configure Magento 2 for Redis:

  • Via SSH, run php bin/magento setup:config:set --session-save=redis --session-save-redis-host=redis-session --session-save-redis-log-level=3 --session-save-redis-db=0 --session-save-redis-port=6380


  • Edit the “session” block in env.php:

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


As an alternative to Redis for session cache, Memcache may be used. Memcache status can be observed and the sessions flushed using the Memcache STRATUS Control panel.

Magento 1

Edit your session block in local.xml to enable Memcache sessions on your Magento 1 store if using PHP 5.6:


If you are using PHP 7.0 or higher with Magento 1, use the following instead:



Edit your “session” block in env.php to enable Memcache sessions on your Magento 2 store.

'session' =>
   array (
      'save' => 'memcache',
      'save_path' => 'tcp://memcache:11211'

For Magento version 2.3+, add the following under PHP > OPTIONS:



Last modified January 1, 0001