$CFG->altcacheconfigpath

Re: $CFG->altcacheconfigpath

by Howard Miller -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Did you see...

    define('TEST_CACHE_USING_ALT_CACHE_CONFIG_PATH', true');
    $CFG->altcacheconfigpath = '/a/temp/directory/yoursite.php'
This tells Moodle to use the config at $CFG->altcacheconfigpath when running tests.
There are a couple of considerations to using this method:
* By setting $CFG->altcacheconfigpath your site will store the cache config in the specified path, not just the test cache config but your site config as well.
* If you have configured your cache before setting $CFG->altcacheconfigpath you will need to copy it from moodledata/muc/config.php to the destination you specified.
* This allows you to share a cache config between sites.
* It also allows you to use tests to test your sites cache config.


...and MDL-45513

I'm not entirely sure what problem it fixes either!


Average of ratings: Useful (1)