Performance optimizations
This commit is contained in:
@@ -30,12 +30,14 @@ class Workflowitem extends mfBaseModel {
|
||||
return $value;
|
||||
}
|
||||
$value = WorkflowvalueModel::getFirst(['item_id' => $this->id, "object_id" => $this->object_id]);
|
||||
// explicitly cache empty value
|
||||
mfValuecache::singleton()->set("wfItemvalue-item-".$this->id."-object-".$this->object_id, $value);
|
||||
if(!$value) {
|
||||
$vdata['item_id'] = $this->id;
|
||||
$vdata['object_id'] = $this->object_id;
|
||||
$value = WorkflowvalueModel::create($vdata);
|
||||
|
||||
}
|
||||
mfValuecache::singleton()->set("wfItemvalue-item-".$this->id."-object-".$this->object_id, $value);
|
||||
$this->value = $value;
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user