mirror of
https://github.com/friendica/friendica
synced 2025-02-08 21:38:51 +00:00
Remove support for apc
This commit is contained in:
parent
8448d719e7
commit
4e49c45021
1 changed files with 3 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
namespace Friendica\Core\Cache\Type;
|
namespace Friendica\Core\Cache\Type;
|
||||||
|
|
||||||
|
use APCUIterator;
|
||||||
use Friendica\Core\Cache\Enum\Duration;
|
use Friendica\Core\Cache\Enum\Duration;
|
||||||
use Friendica\Core\Cache\Capability\ICanCacheInMemory;
|
use Friendica\Core\Cache\Capability\ICanCacheInMemory;
|
||||||
use Friendica\Core\Cache\Exception\InvalidCacheDriverException;
|
use Friendica\Core\Cache\Exception\InvalidCacheDriverException;
|
||||||
|
@ -41,11 +42,7 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory
|
||||||
$ns = $this->getCacheKey($prefix ?? '');
|
$ns = $this->getCacheKey($prefix ?? '');
|
||||||
$ns = preg_quote($ns, '/');
|
$ns = preg_quote($ns, '/');
|
||||||
|
|
||||||
if (class_exists('\APCIterator')) {
|
$iterator = new APCUIterator('/^' . $ns . '/', APC_ITER_KEY);
|
||||||
$iterator = new \APCIterator('user', '/^' . $ns. '/', APC_ITER_KEY);
|
|
||||||
} else {
|
|
||||||
$iterator = new \APCUIterator('/^' . $ns . '/', APC_ITER_KEY);
|
|
||||||
}
|
|
||||||
|
|
||||||
$keys = [];
|
$keys = [];
|
||||||
foreach ($iterator as $item) {
|
foreach ($iterator as $item) {
|
||||||
|
@ -122,7 +119,7 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory
|
||||||
$prefix = $this->getPrefix();
|
$prefix = $this->getPrefix();
|
||||||
$prefix = preg_quote($prefix, '/');
|
$prefix = preg_quote($prefix, '/');
|
||||||
|
|
||||||
$iterator = new \APCUIterator('/^' . $prefix . '/', APC_ITER_KEY);
|
$iterator = new APCUIterator('/^' . $prefix . '/', APC_ITER_KEY);
|
||||||
|
|
||||||
return apcu_delete($iterator);
|
return apcu_delete($iterator);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue