完成自动缓存功能集成;

This commit is contained in:
2022-04-20 15:00:23 +08:00
parent 07b2dda529
commit cc29874a16
10 changed files with 238 additions and 57 deletions

View File

@@ -34,6 +34,7 @@ class Index extends AdminController
$quicks = SystemQuick::field('id,title,icon,href')
->where(['status' => 1])
->order('sort', 'desc')
->autoCache('welcome_list')
->limit(8)
->select();
$this->assign('quicks', $quicks);

View File

@@ -20,6 +20,13 @@ class SystemAdmin extends TimeModel
protected $deleteTime = 'delete_time';
public static $autoCache = [
[
'name' => 'info',
'field' => 'id'
]
];
public function getAuthList()
{
$list = (new SystemAuth())
@@ -27,5 +34,4 @@ class SystemAdmin extends TimeModel
->column('title', 'id');
return $list;
}
}
}

View File

@@ -44,6 +44,4 @@ class SystemNode extends TimeModel
}
return $newList;
}
}
}

View File

@@ -20,4 +20,9 @@ class SystemQuick extends TimeModel
protected $deleteTime = 'delete_time';
}
public static $autoCache = [
[
'name' => 'welcome_list'
]
];
}