diff --git a/crmeb/app/adminapi/controller/v1/system/Clear.php b/crmeb/app/adminapi/controller/v1/system/Clear.php index 0578a9394..ada8648fc 100644 --- a/crmeb/app/adminapi/controller/v1/system/Clear.php +++ b/crmeb/app/adminapi/controller/v1/system/Clear.php @@ -33,7 +33,7 @@ class Clear extends AuthController */ public function refresh_cache() { - $this->services->refresCache(); + $this->services->refreshCache(); return app('json')->success(400302); } diff --git a/crmeb/app/services/system/log/ClearServices.php b/crmeb/app/services/system/log/ClearServices.php index 70bd61380..438723d04 100644 --- a/crmeb/app/services/system/log/ClearServices.php +++ b/crmeb/app/services/system/log/ClearServices.php @@ -51,7 +51,7 @@ class ClearServices extends BaseServices /** * 刷新数据缓存 */ - public function refresCache() + public function refreshCache() { $root = app()->getRootPath() . 'runtime' . DS; $adminRoute = $root . 'admin'; @@ -78,6 +78,6 @@ class ClearServices extends BaseServices } } } - CacheService::clear(); + CacheService::clearAll(); } } diff --git a/crmeb/crmeb/services/CacheService.php b/crmeb/crmeb/services/CacheService.php index 8e43e70cc..8511cf916 100644 --- a/crmeb/crmeb/services/CacheService.php +++ b/crmeb/crmeb/services/CacheService.php @@ -98,6 +98,19 @@ class CacheService return Cache::tag($tag)->clear(); } + /** + * 清空全部缓存 + * @return bool + * @author 吴汐 + * @email 442384644@qq.com + * @date 2023/12/19 + */ + public static function clearAll() + { + return Cache::clear(); + } + + /** * 检查缓存是否存在 * @param string $key