mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-21435 sending JS cache to cache/js instead of temp; adding purging of JS caches
This commit is contained in:
parent
6b2ad29acb
commit
09c48cea8b
@ -64,10 +64,16 @@ minify($jsfiles);
|
||||
function minify($files) {
|
||||
global $CFG;
|
||||
|
||||
$cachedir = $CFG->dataroot.'/cache/js';
|
||||
// make sure the cache dir exist
|
||||
if (!file_exists($cachedir)) {
|
||||
@mkdir($cachedir, $CFG->directorypermissions, true);
|
||||
}
|
||||
|
||||
if (0 === stripos(PHP_OS, 'win')) {
|
||||
Minify::setDocRoot(); // IIS may need help
|
||||
}
|
||||
Minify::setCache($CFG->dataroot.'/temp', true);
|
||||
Minify::setCache($cachedir, true);
|
||||
|
||||
$options = array(
|
||||
// Maximum age to cache
|
||||
|
@ -1004,6 +1004,6 @@ function js_reset_all_caches() {
|
||||
require_once("$CFG->libdir/filelib.php");
|
||||
|
||||
set_config('jsrev', empty($CFG->jsrev) ? 1 : $CFG->jsrev+1);
|
||||
//fulldelete("$CFG->dataroot/cache/js");
|
||||
fulldelete("$CFG->dataroot/cache/js");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user