> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://krystal-dev.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Configuring Redis caching in Magento

#### What is object caching?

An object cache stores the results of expensive and/or frequent database queries in a way that makes them easy to retrieve, and eliminates the need for repeated access to the database. Object caching greatly reduces the time it takes to retrieve query results.

#### What is Redis?

Redis (**Re**mote **Di**ctionary **S**erver) is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.

It supports data structures such as strings, hashes, lists, sets, range queries, bitmaps, hyper loglogs and geospatial indexes with radius queries.

In its simplest form, Redis is a caching system that can be combined with MySQL or MariaDB to optimize the application level speed.

#### How do I enable Redis?

We have a separate guide that covers [enabling Redis on your Premium PCI-DSS compliant hosting account (Link opens in a new tab).](https://help.krystal.uk/cpanel-advanced-topics/how-do-i-enable-redis-on-my-pci-compliant-hosting-account)

#### How do I enable Redis Caching for Magento?

| In order to follow this guide, you will need to be able to access your cPanel account (Link opens in a new tab).

Enabling redis caching is a simple process. Once you have enabled redis on your premium PCI-DSS compliant hosting account, you will need to run the following command in your Terminal:

`bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server='/var/kredis/YOURSOCKETPATH/redis.sock' --cache-backend-redis-port=0`

1.  Login to your cPanel account
2.  Navigate to the **Advanced** section and click **Redis Manager**
    
    ![](https://storage.crisp.chat/users/helpdesk/website/e244ee6bae7cd800/c1af3c91-fb2e-459a-bf01-97bbec_1pnml5o.png)
    
3.  Copy your Socket path as shown i.e. `/var/kredis/enableredis/redis.sock`

![](https://storage.crisp.chat/users/helpdesk/website/c81b3e192fed1800/105cc864-ab6a-4e9f-a173-45fced_1goh3a1.png)

1.  Navigate to the **Advanced** section and click **Terminal**

![](https://storage.crisp.chat/users/helpdesk/website/5ba03d848cbbc400/acdf0ae1-54a1-437d-bc93-5ba8a6_ripwno.png)

1.  Run the following command within the terminal, ensuring that you replace `/var/kredis/YOURSOCKETPATH/redis.sock` with your socket path as shown in the previous steps:

`bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server='/var/kredis/YOURSOCKETPATH/redis.sock' --cache-backend-redis-port=0`

1.  Done!

* * *

* * *