mirror of https://gitee.com/karson/fastadmin.git
修复清除缓存的BUG
parent
3134cb7869
commit
7dc185fb5f
|
|
@ -198,19 +198,22 @@ class Ajax extends Backend
|
||||||
{
|
{
|
||||||
$type = $this->request->request("type");
|
$type = $this->request->request("type");
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'content' || 'all':
|
case 'content':
|
||||||
rmdirs(CACHE_PATH, false);
|
rmdirs(CACHE_PATH, false);
|
||||||
Cache::clear();
|
Cache::clear();
|
||||||
if ($type == 'content')
|
break;
|
||||||
break;
|
case 'template':
|
||||||
case 'template' || 'all':
|
|
||||||
rmdirs(TEMP_PATH, false);
|
rmdirs(TEMP_PATH, false);
|
||||||
if ($type == 'template')
|
break;
|
||||||
break;
|
case 'addons':
|
||||||
case 'addons' || 'all':
|
|
||||||
Service::refresh();
|
Service::refresh();
|
||||||
if ($type == 'addons')
|
break;
|
||||||
break;
|
case 'all':
|
||||||
|
rmdirs(CACHE_PATH, false);
|
||||||
|
Cache::clear();
|
||||||
|
rmdirs(TEMP_PATH, false);
|
||||||
|
Service::refresh();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
\think\Hook::listen("wipecache_after");
|
\think\Hook::listen("wipecache_after");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue