mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add the apcu caching ability for performance (#7276)
* add the apcu caching ability for performance When the PHP extension APCu is loaded, the settings class and the auto_loader will cache their results across requests in RAM. For more information about the APCu extension visit the PHP page: https://www.php.net/apcu * use global instead of default terminology
This commit is contained in:
@@ -187,6 +187,17 @@ class cache {
|
||||
closelog();
|
||||
}
|
||||
|
||||
//check for apcu extension
|
||||
if (function_exists('apcu_enabled') && apcu_enabled()) {
|
||||
//flush everything
|
||||
apcu_clear_cache();
|
||||
}
|
||||
|
||||
//remove the autoloader file cache
|
||||
if (file_exists(sys_get_temp_dir() . '/' . auto_loader::FILE)) {
|
||||
@unlink(sys_get_temp_dir() . '/' . auto_loader::FILE);
|
||||
}
|
||||
|
||||
//cache method memcache
|
||||
if ($this->method === "memcache") {
|
||||
// connect to event socket
|
||||
|
||||
Reference in New Issue
Block a user