mirror of
https://github.com/friendica/friendica
synced 2025-04-29 16:24:23 +02:00
Remove support for apc
apc is deprecated since PHP 5.5 and not compatible with PHP 7
This commit is contained in:
parent
ad6be21b56
commit
8448d719e7
1 changed files with 2 additions and 9 deletions
|
@ -122,11 +122,7 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory
|
||||||
$prefix = $this->getPrefix();
|
$prefix = $this->getPrefix();
|
||||||
$prefix = preg_quote($prefix, '/');
|
$prefix = preg_quote($prefix, '/');
|
||||||
|
|
||||||
if (class_exists('\APCIterator')) {
|
|
||||||
$iterator = new \APCIterator('user', '/^' . $prefix . '/', APC_ITER_KEY);
|
|
||||||
} else {
|
|
||||||
$iterator = new \APCUIterator('/^' . $prefix . '/', APC_ITER_KEY);
|
$iterator = new \APCUIterator('/^' . $prefix . '/', APC_ITER_KEY);
|
||||||
}
|
|
||||||
|
|
||||||
return apcu_delete($iterator);
|
return apcu_delete($iterator);
|
||||||
}
|
}
|
||||||
|
@ -149,10 +145,7 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory
|
||||||
return false;
|
return false;
|
||||||
} elseif (!ini_get('apc.enabled') && !ini_get('apc.enable_cli')) {
|
} elseif (!ini_get('apc.enabled') && !ini_get('apc.enable_cli')) {
|
||||||
return false;
|
return false;
|
||||||
} elseif (
|
} elseif (version_compare(phpversion('apcu') ?: '0.0.0', '5.1.0', '<')) {
|
||||||
version_compare(phpversion('apc') ?: '0.0.0', '4.0.6') === -1 &&
|
|
||||||
version_compare(phpversion('apcu') ?: '0.0.0', '5.1.0') === -1
|
|
||||||
) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue