# Mautic Cache Redis config

**URL:** <https://forum.mautic.org/t/mautic-cache-redis-config/20176>\
**Category:** Product Support\
**Tags:** development, mautic-3\
**Created:** [July 15, 2021, 2:32pm UTC](https://forum.mautic.org/t/mautic-cache-redis-config/20176 "2021-07-15T14:32:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 13, 2022, 11:32pm UTC](https://forum.mautic.org/t/mautic-cache-redis-config/20176/2 "2022-01-13T23:32:11Z")

</div>

Hello,

I am also trying to setup mautic to use Redis so I figured I would use an old post since there is no solution reply.

**Your software**  
My Mautic version is: 4.1.1  
My PHP version is: 7.4  
My Database type and version is: MariaDB 10.3

**Your problem**  
My problem is:  
I am trying to configure Mautic so that it uses Redis instead of filesystem cache. I installed redis-server package on my system as well as php-redis.

These errors are showing in the log:  
[no errors detect in logs]

Steps I have tried to fix the problem:

I have tried to looking into documentation here: [https://developer.mautic.org/?php&\_ga=2.63514735.1361225527.1642110543-284173810.1641816063#configuration](https://developer.mautic.org/?php&_ga=2.63514735.1361225527.1642110543-284173810.1641816063#configuration) and I tried to reverse engineer whats happening (I looked into cache bundle). I also consult Symfony docs to see how to configure a dsn.

I came up with the following configuration I put into app/config/local.php:

```auto
'cache_adapter' => 'mautic.cache.adapter.redis',
'cache_adapter_redis' => array(
        'dsn' => 'redis://<ip>:<port>/<database-index>',
        'options' => array(
                'lazy' => false,
                'persistent' => 0,
                'persistent_id' => null,
                'timeout' => 30,
                'read_timeout' => 0,
                'retry_interval' => 0,
        ),
),
'cache_prefix' => 'pa_',
'cache_lifetime' => 3600

```

But it does not seem to have any effect. When I am using Mautic and regulary inspecting the contents of redis database there is no entries, meanwhile I can see that cache is being generated on the filesystem. What am I doing wrong?

Any help would be much appreciated.

Regards, M.

---

_[View the full topic](https://forum.mautic.org/t/mautic-cache-redis-config/20176)._
