diff --git a/application/admin/library/traits/Backend.php b/application/admin/library/traits/Backend.php index d231811c0c0421d12db2487c7aea5f17c4c76c7d..5825a4cbc6c5810669b7463ea36a45230afb052c 100755 --- a/application/admin/library/traits/Backend.php +++ b/application/admin/library/traits/Backend.php @@ -8,6 +8,7 @@ use PhpOffice\PhpSpreadsheet\Reader\Xlsx; use PhpOffice\PhpSpreadsheet\Reader\Xls; use PhpOffice\PhpSpreadsheet\Reader\Csv; use think\Exception; +use think\Cache; trait Backend { @@ -117,6 +118,8 @@ trait Backend } $result = $this->model->allowField(true)->save($params); if ($result !== false) { + rmdirs(CACHE_PATH, false); + Cache::clear(); $this->success(); } else { $this->error($this->model->getError()); @@ -161,6 +164,8 @@ trait Backend } $result = $row->allowField(true)->save($params); if ($result !== false) { + rmdirs(CACHE_PATH, false); + Cache::clear(); $this->success(); } else { $this->error($row->getError());