Config.php setting for Redis Cache

Config.php setting for Redis Cache

by Smruti Ranjan Mandal -
Number of replies: 2

Hi,

I am trying to run our non-production moodle app on ephemeral (GCP-preemptible/AWS-spot) servers. 

OS: Debian 9

Web Server: Apache 2

Database: MySQL 5.7

I want to use an external Redis server for session and caching. I understand it can be configured in GUI following this document. However, as I am configuring the setup as part of the server initialisation script, could you please let me know how to set the Redis instance URL and port in the config.php.

Many thanks!

Average of ratings: -
In reply to Smruti Ranjan Mandal

Re: Config.php setting for Redis Cache

by Matt T -
Have a look inside config-dist.php in your wwwroot, there is an example. Copy this across into config.php (above require_once(...);), making adjustments as necessary.

https://github.com/moodle/moodle/blob/master/config-dist.php#L313
Average of ratings: Useful (1)