Permalink
Browse files

Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; b…

…ackported from HEAD
  • Loading branch information...
1 parent 779de74 commit 823844e709e6b42c54e668003002bc2e95bfe506 stronk7 committed Apr 8, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/datalib.php
View
@@ -1604,6 +1604,11 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
$db->Execute('UPDATE '. $CFG->prefix .'user
SET lastip=\''. $REMOTE_ADDR .'\', lastaccess=\''. $timenow .'\'
WHERE id = \''. $userid .'\' ');
+ /// 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++;};

0 comments on commit 823844e

Please sign in to comment.