catalyst / moodle-tool_forcedcache

Moodle MUC config managed deterministicly in code using rulesets
https://moodle.org/plugins/tool_forcedcache
9 stars 9 forks source link

Can't make plugin working with Moodle 3.11 and AWS elasticache Redis #26

Open pdechandol opened 3 years ago

pdechandol commented 3 years ago

Hi,

I'm struggling to make the plugin work with my Moodle instance. The test page says that my configuration (done in config.php) is OK. But my Redis store isn't created and the store mappings aren't set.

My Moodle instance is deployed in AWS cluster. The Redis host is an AWS Elastisearch host. If I set everything manually in Moodle administration, everything is ok.

Here is the piece of my config.php dealing with the plugin. The expression {{ ... }} are well-replaced and the resulting final file is correct.

`$CFG->tool_forcedcache_config_array = [ 'stores' => [ // Redis is an all round great workhorse cache which // we use as the main shared cache. // https://docs.moodle.org/en/Redis_cache_store 'aws_elasticache_redis' => [ 'type' => 'redis', 'name' => 'aws_elasticache_redis', 'config' => [ 'server' => '{{ .Values.config.elasticacheClusterAddress }}', 'prefix' => '{{ .Values.config.redisPrefix }}', 'password' => '', 'serializer' => 1, 'compressor' => 0 ] ] ], 'rules' => [ 'application' => [ [ 'stores' => ['aws_elasticache_redis'] ] ], 'session' => [ [ 'stores' => ['aws_elasticache_redis'] ] ], 'request' => [] ], 'definitionoverrides' => [] ];

$CFG->alternative_cache_factory_class = 'tool_forcedcache_cache_factory';`
Peterburnett commented 3 years ago

Hi @pdechandol Are you able to post a screenshot of the /admin/tool/forcedcache/index.php page. The above config all looks correct, but its formatting makes it difficult to spot subtle errors.