*/
public function get_css_content_debug($type, $subtype, $sheet) {
+
if ($type === 'scss') {
// The SCSS file of the theme is requested.
$csscontent = $this->get_css_content_from_scss(true);
// TODO: MDL-62757 When changing anything in this method please do not forget to check
// if the validate() method in class admin_setting_configthemepreset needs updating too.
-
+ $cacheoptions = '';
+ if ($themedesigner) {
+ $scsscachedir = $CFG->localcachedir . '/scsscache/';
+ $cacheoptions = array(
+ 'cacheDir' => $scsscachedir,
+ 'prefix' => 'scssphp_',
+ 'forceRefresh' => false,
+ );
+ }
// Set-up the compiler.
- $compiler = new core_scss();
+ $compiler = new core_scss($cacheoptions);
$compiler->prepend_raw_scss($this->get_pre_scss_code());
if (is_string($scss)) {
$compiler->set_file($scss);