mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
优化网站缓存;
This commit is contained in:
@@ -43,15 +43,18 @@ trait AutoClearCache
|
||||
|
||||
$field = $cache_item['field'] ?? '';
|
||||
|
||||
|
||||
|
||||
$cache_key = $cache_item['name'] ?? '';
|
||||
|
||||
if (empty($cache_key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($field)) {
|
||||
if (!is_null($model->$field)) {
|
||||
$cache_key = $cache_key . '_' . $model->$field;
|
||||
$cache_key = $cache_key . '_' . $model->getAttr($field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user