Redis, Memcache install verification

Hello to everyone,

Just a quick question. I’m asking myself how can I check that my cache configuration is working?

I have this in my config.php:

'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'redis' => 
    array (
        'host' => '',
        'port' => 6379,
'memcache.locking' => '\\OC\\Memcache\\Redis',

But then if I go to data/myusername/cache the folder is empty. Is it normal?
Second thing how can I check that my redis cache system is working, is there a way on nextcloud or on redis using redis-cli to know ?

Because I don’t see real difference when using the web interface.

Thank you for your answers.


1 Like

Hey there, hope you are doing well…

First, one optimization change that you can do, it’s to change the ‘host’ line to “localhost” (ONLY IF REDIS IS RUNNING ON THE SAME MACHINE AS NEXTCLOUD).

This is an example:

‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,

Second, run this on your machine to check if redis is up and running:
systemctl status redis

Hope this can helps, good luck.

Have a nice week mate!



Thank you for your answer.

I’ve a dedicated redis server that’s why I’ve put the local ip.
I know the server is running as I was connected on it just before.

But I need to check that there are indeed file caching, but there seems to be no way to verify it. Another wierd point is that my local cache folder is empty, maybe someone can check his and let me know if it’s also empty or not ?

Thank you by the way for your help.

Hmm, that’s weird, your cache folder should be working as usual.

Did you checked /var/redis?

If it’s empty, you probably just installed redis but did not configured it yet, I recommend you to follow this tutorial: Redis Quick Start – Redis.

Hope this can helps, also, search on how to set a custom redis cache directory inside your config.php file.

Good luck mate, all the best!

for my docker installation i noted this command

#live view on redis requests (${redis_host_password} comes from docker .env file)
docker exec -ti nextcloud-redis sh -c 'redis-cli -a ${REDIS_HOST_PASSWORD} MONITOR'

which basically executes redis-cli -a ${REDIS_HOST_PASSWORD} MONITOR within redis container - you might run the the command adopted to your environment - while you navigate through your NC WebUI (e.g. visit some folders in Files app) it should generate some output