I'm checking label module in /mod/label. I want to disable cahing in dis file: /mod/label/lib.php -> function label_get_coursemodule_info:
function label_get_coursemodule_info($coursemodule) {
global $DB;
if ($label = $DB->get_record('label', array('id'=>$coursemodule->instance), 'id, name, intro, introformat')) {
if (empty($label->name)) {
// label name missing, fix it
$label->name = "label{$label->id}";
$DB->set_field('label', 'name', $label->name, array('id'=>$label->id));
}
$info = new cached_cm_info();
// no filtering hre because this info is cached and filtered later
$info->content = format_module_intro('label', $label, $coursemodule->id, false);
$info->name = $label->name;
return $info;
} else {
return null;
}
}
in this line
$info = new cached_cm_info();
caching of outputs is commanded. How I can disable caching. How I can send dynamic data here? is there any command to refresh cached files every time. Another matter to say: I checked this code, after first time of calling this function, it will not called again an caller is /course/lib.php and I do not want to edit course/lib.php!