From: stronk7 Date: Tue, 8 Apr 2008 23:17:20 +0000 (+0000) Subject: Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; merged from 19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cb8aaedf61b6d5d7c3ebc609d1987f8dd8f8c30c;p=moodle.git Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; merged from 19_STABLE --- diff --git a/lib/datalib.php b/lib/datalib.php index 4105429e83..66876f5038 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1941,6 +1941,11 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user if (!$res) { debugging('

Error: Could not insert a new entry to the Moodle log

'); // Don't throw an error } + /// Remove this record from record cache since it will change + if (!empty($CFG->rcache)) { + rcache_unset('user', $userid); + } + if ($courseid != SITEID && !empty($courseid)) { if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++;};