} else {
$key = $table . '|' . $id;
- if (isset($MCACHE) && $MCACHE->status()) {
+ if (isset($MCACHE)) {
// $table is a flag used to mark
// a table as dirty & uncacheable
// when an UPDATE or DELETE not bound by ID
}
} else {
$key = $table . '|' . $id;
- if (isset($MCACHE) && $MCACHE->status()) {
+ if (isset($MCACHE)) {
$MCACHE->delete($key);
}
}
}
}
- if (isset($MCACHE) && $MCACHE->status()) {
+ if (isset($MCACHE)) {
$key = $table . '|' . $id;
// we set $table as a flag used to mark
// a table as dirty & uncacheable
return rcache_get($table, $id);
}
- if (isset($MCACHE) && $MCACHE->status()) {
+ if (isset($MCACHE)) {
$key = $table . '|' . $id;
// if $table is set - we won't take the
// lock either
function rcache_releaseforfill($table, $id) {
global $CFG, $MCACHE;
- if (isset($MCACHE) && $MCACHE->status()) {
+ if (isset($MCACHE)) {
$key = $table . '|' . $id;
return $MCACHE->releaseforfill($key);
}
return true;
}
- if (isset($MCACHE) && $MCACHE->status()) {
+ if (isset($MCACHE)) {
// at least as long as content keys to ensure they expire
// before the dirty flag
$MCACHE->set($table, true, $CFG->rcachettl);