mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 18:02:15 +09:00
Add buttons to clear apcu and opcache
This commit is contained in:
parent
9160b867aa
commit
80b235001e
6 changed files with 53 additions and 2 deletions
|
|
@ -153,6 +153,36 @@ class adminAdminController extends admin
|
|||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear APCU cache
|
||||
*/
|
||||
public function procAdminClearApcu()
|
||||
{
|
||||
if (function_exists('apcu_clear_cache') && apcu_clear_cache())
|
||||
{
|
||||
return new BaseObject(0, 'success_updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'apcu_clear_cache_function_not_found');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear opcache
|
||||
*/
|
||||
public function procAdminClearOpcache()
|
||||
{
|
||||
if (function_exists('opcache_reset') && opcache_reset())
|
||||
{
|
||||
return new BaseObject(0, 'success_updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'opcache_reset_function_not_found');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue