Redis Sesion Driver

Redis Sesion Driver
What is Redis?

By default, OpenCart uses MySQL database or native (files) session storage
It works great, but it is a bit slow.

Redis is perfect for storing sessions.
All operations are performed in memory, and so reads and write will be fast.

Redis is a highly efficient distributed data storage. High operation speed is guaranteed by data storage in RAM, being regularly saved on a disk, after equal periods or when reaching a certain number of queries

How to setup redis session driver

In the OpenCart admin backend, do the following steps:
Install via Extensions > Marketplace or via Extensions > Installer > Upload

Then you need to define a few constants in
config.php
admin/config.php

Default config
// Redis
define('CACHE_HOSTNAME', '127.0.0.1');
define('CACHE_PORT', '6379');
define('CACHE_PREFIX', 'redis_');
define('CACHE_PASSWORD', '');


Config for Unix socket
// Redis
define('CACHE_HOSTNAME', '/tmp/redis.sock');
define('CACHE_PORT', '0');
define('CACHE_PREFIX', 'redis_');
define('CACHE_PASSWORD', '');


OpenCart 3.x

system->config->default.php
system->config->catalog.php

change the value from
$_['session_engine'] = 'db';
to
$_['session_engine'] = 'redis';

OpenCart 2.x

system/framework.php

change the value from
$session = new Session();

to
$session = new Session('redis');

Free installation service
If you need help with installation just press the "Get support" button and we will do it for you.




Price
$20.00

  • Developed by OpenCart Community
  • 12 Months Free Support
  • Documentation Included

Rating

Compatibility
2.2.0.0, 2.3.0.0, 2.3.0.1, 2.3.0.2, 2.2.0.0, 2.3.0.0, 2.3.0.1, 2.3.0.2, 3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.3.3, 3.0.3.5, 3.0.3.6, 3.0.3.7, 3.0.3.8, 3.0.3.9

Last Update
17 Nov 2023

Created
8 Mar 2021
13 Sales
1 Comments
Simple-OpenCart
Simple-OpenCart
Member since: 12 Jun 2014

View all extensions Get Support