Redis support for Concrete5?
Permalink 1 user found helpful<?php /** * ----------------------------------------------------------------------------- * Generated 2020-12-14T18:30:43+01:00 * * DO NOT EDIT THIS FILE DIRECTLY * * @item cache.clear.thumbnails * @group concrete * @namespace null * ----------------------------------------------------------------------------- */ return [ 'locale' => 'nl_NL', 'version_installed' => '8.5.4',
It's showing a error message (see attachment).
Because we use a UNIX socket instead of TCP/IP, we need to do the following:
* Specify the server using the path to the socket. In my case, this was "/tmp/redis.sock"
* Specify the port as "0" (choose any other, or leave it out and your website stops functioning.)
Because it was quite the mission to find the correct configuration lines for the different caching that's possible in Concrete5 I will share the contents of my concrete.php below.
Please note that this file should be placed in the ./application/config folder, Leave concrete.php located in ./concrete/config or any other folder alone. (if ./application/config does not have a concrete.php file, just create it)
<?php return [ 'cache' => [ 'levels' => [ 'overrides' => [ 'preferred_driver' => 'redis', 'drivers'=> [ 'redis'=>[ 'options' => [ 'servers' => [ [ 'server' => '/tmp/redis.sock', 'port' => 0, //0 when connecting to a UNIX socket ], ],
Note that I have used a different Redis database number for each cache as this was recommended. change the number as required if you are already using the ones in my config for another website.
The config takes care of using Redis for Overrides cache, Expensive cache, Full page caching, and Session handling. Object caching is also possible but when I tried it, it had a negative impact on the performance of my website.
I hope this helps everyone!
Best regards,
Jesse
ps: I have also included the contents of the above code box as an attachment.
https://github.com/concrete5/concrete5/pull/7206#issuecomment-546684...
You just need to configure your concrete.php config file with your redis credentials and change the preffered driver to 'redis'.