Added simple caching to Termination and Building workflow
This commit is contained in:
@@ -80,9 +80,13 @@ class Building extends mfBaseModel {
|
||||
}
|
||||
|
||||
public function getWorkflowvalue($itemname, $type = false) {
|
||||
$item = WorkflowitemModel::getFirst(['name' => $itemname]);
|
||||
if(!$item->id) {
|
||||
return null;
|
||||
$item = mfValuecache::get("wfBuilding-".$itemname);
|
||||
if(!$item) {
|
||||
$item = WorkflowitemModel::getFirst(['name' => $itemname]);
|
||||
if(!$item->id) {
|
||||
return null;
|
||||
}
|
||||
mfValuecache::set("wfBuilding-".$itemname, $item);
|
||||
}
|
||||
|
||||
switch($item->type) {
|
||||
|
||||
Reference in New Issue
Block a user