0

We use Redis in Magento 1 And now with Magento 2 there as some questions that others may also have.

For PAGE CACHE we can use json config

`'compress_data' => '1','compression_library' => 'snappy',` 

question: but how do we set compression for Redis Session and Normal Cache?

'x-frame-options' => 'SAMEORIGIN',
'MAGE_MODE_AVAILABLE_OPTIONS' => 'developer, default, production, maintenance',
'MAGE_MODE' => 'default',
'session' => array(
    'save' => 'redis',
    'redis' => array(
        'host'                  => 'localhost',
        'port'                  => '6380',
        'password'              => '',
        'timeout'               => '2.5',
        'persistent_identifier' => '',
        'database'              => '3',
        'compression_threshold' => '2048',
        'compress_data' => '1',
        'compression_library'   => 'snappy',
        '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',
    ),
),
'cache' => array (
    'frontend' => array (
        'default' => array (
            'backend'         => 'Cm_Cache_Backend_Redis',
            'backend_options' => array (
                'server' => 'localhost',
                'port'   => '6380',
                'database'      => '5',
                'compress_data' => '1',
                'compression_library' => 'snappy',
                'id_prefix' => 'dev1_'
            ),
        ),
        'page_cache' => array (
            'backend'         => 'Cm_Cache_Backend_Redis',
            'backend_options' => array (
                'server'        => 'localhost',
                'port'          => '6380',
                'database'      => '5',
                'compress_data' => '1',
                'compression_library' => 'snappy',
                'id_prefix' => 'dev1_'
            ),
        ),
    ),
),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.