Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
bb250f02
Commit
bb250f02
authored
Sep 18, 2012
by
Sam Hemelryk
Browse files
MDL-25290 cache: Added optional CFG setting to control location of cache config file
parent
167ad91e
Changes
2
Hide whitespace changes
Inline
Side-by-side
cache/classes/config.php
View file @
bb250f02
...
...
@@ -105,6 +105,17 @@ class cache_config {
*/
protected
static
function
get_config_file_path
()
{
global
$CFG
;
if
(
!
empty
(
$CFG
->
altcacheconfigpath
))
{
$path
=
$CFG
->
altcacheconfigpath
;
if
(
is_dir
(
$path
)
&&
is_writable
(
$path
))
{
// Its a writable directory, thats fine.
return
$path
.
'/cacheconfig.php'
;
}
else
if
(
is_writable
(
dirname
(
$path
))
&&
(
!
file_exists
(
$path
)
||
is_writable
(
$path
)))
{
// Its a file, either it doesn't exist and the directory is writable or the file exists and is writable.
return
$path
;
}
}
// Return the default location within dataroot.
return
$CFG
->
dataroot
.
'/muc/config.php'
;
}
...
...
config-dist.php
View file @
bb250f02
...
...
@@ -411,6 +411,17 @@ $CFG->admin = 'admin';
//
// $CFG->extramemorylimit = '1G';
//
// Moodle 2.4 introduced a new cache API.
// The cache API stores a configuration file within the Moodle data directory and
// uses that rather than the database in order to function in a stand-alone manner.
// Using altcacheconfigpath you can change the location where this config file is
// looked for.
// It can either be a directory in which to store the file, or the full path to the
// file if you want to take full control. Either way it must be writable by the
// webserver.
//
// $CFG->altcacheconfigpath = '/var/www/shared/moodle.cache.config.php
//
// The CSS files the Moodle produces can be extremely large and complex, especially
// if you are using a custom theme that builds upon several other themes.
// In Moodle 2.3 a CSS optimiser was added as an experimental feature for advanced
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment