ANS Documentation

Improve This Doc
  • Cloud
  • Desktop and Office Solutions
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
    • Magento
    • Shopware
      • Adding Domain(s) To The Stack
      • PHP
      • OPCache
      • APCu
      • Redis
      • Varnish
    • WooCommerce
    • AeroCommerce
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
  • Webcelerator
  • MyUKFast
  • Home >
  • eCommerce Stacks >
  • Shopware >
  • Redis >
  • Redis

Redis¶

Cache¶

From Shopware 5.3 it is possible to use Redis as cache adapter. Add the following to config.php:

'model' => [
    'redisHost' => '127.0.0.1',
    'redisPort' => 6379,
    'redisDbIndex' => 0,
    'cacheProvider' => 'redis'
],
'cache' => [
    'backend' => 'redis', // e.G auto, apcu, xcache
    'backendOptions' => [
        'servers' => [
            [
                'host' => '127.0.0.1',
                'port' => 6379,
                'dbindex' => 0,
                'redisAuth' => ''
            ],
        ],
    ],
]

Be aware, that for Zend_Cache::CLEANING_MODE_ALL the cache implementation will issue FLUSHDB and therefore clear the current Redis DB index. For that reason, the DB index for the cache should not be used for persistent data.

Sessions¶

You can use Redis for sessions by adding to the config.php file:

'session' => [
    'save_handler' => 'redis',
    'save_path' => "tcp://127.0.0.1:6379",
],

'backendsession' => [
    'save_handler' => 'redis',
    'save_path' => "tcp://127.0.0.1:6379",
],

You may need to change the IP address and you can change the port to run backend sessions and frontend sessions on different instances.

Redis Service¶

You can find more information on the Redis service here

Next Article > Varnish

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ