mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 05:50:50 +00:00
【程序目录】缓存优化
This commit is contained in:
parent
20352cc696
commit
9e5d67f77e
@ -33,7 +33,7 @@ class Clear extends AuthController
|
||||
*/
|
||||
public function refresh_cache()
|
||||
{
|
||||
$this->services->refresCache();
|
||||
$this->services->refreshCache();
|
||||
return app('json')->success(400302);
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user