修复清除缓存的BUG

pull/82/head
LessCodeToDoMore 2018-11-06 19:10:52 +08:00
parent 3134cb7869
commit 7dc185fb5f
1 changed files with 12 additions and 9 deletions

View File

@ -198,18 +198,21 @@ 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' || 'all': case 'template':
rmdirs(TEMP_PATH, false); rmdirs(TEMP_PATH, false);
if ($type == 'template')
break; break;
case 'addons' || 'all': case 'addons':
Service::refresh();
break;
case 'all':
rmdirs(CACHE_PATH, false);
Cache::clear();
rmdirs(TEMP_PATH, false);
Service::refresh(); Service::refresh();
if ($type == 'addons')
break; break;
} }