Ensure apcu_cache_info function is available before calling (#7323)
This commit is contained in:
parent
1572c76963
commit
6d356194ba
|
|
@ -447,6 +447,7 @@ class settings implements clear_cache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function clear_cache() {
|
public static function clear_cache() {
|
||||||
|
if (function_exists('apcu_enabled') && apcu_enabled()) {
|
||||||
$cache = apcu_cache_info(false);
|
$cache = apcu_cache_info(false);
|
||||||
if (!empty($cache['cache_list'])) {
|
if (!empty($cache['cache_list'])) {
|
||||||
foreach ($cache['cache_list'] as $entry) {
|
foreach ($cache['cache_list'] as $entry) {
|
||||||
|
|
@ -457,4 +458,5 @@ class settings implements clear_cache {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue