From 4e49c45021913e2fd57eb146ff7f78119f8a9163 Mon Sep 17 00:00:00 2001 From: Art4 Date: Tue, 5 Nov 2024 07:07:58 +0000 Subject: [PATCH] Remove support for apc --- src/Core/Cache/Type/APCuCache.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Core/Cache/Type/APCuCache.php b/src/Core/Cache/Type/APCuCache.php index b0db420b82..d9bcfbc60d 100644 --- a/src/Core/Cache/Type/APCuCache.php +++ b/src/Core/Cache/Type/APCuCache.php @@ -7,6 +7,7 @@ namespace Friendica\Core\Cache\Type; +use APCUIterator; use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Cache\Capability\ICanCacheInMemory; use Friendica\Core\Cache\Exception\InvalidCacheDriverException; @@ -41,11 +42,7 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory $ns = $this->getCacheKey($prefix ?? ''); $ns = preg_quote($ns, '/'); - if (class_exists('\APCIterator')) { - $iterator = new \APCIterator('user', '/^' . $ns. '/', APC_ITER_KEY); - } else { - $iterator = new \APCUIterator('/^' . $ns . '/', APC_ITER_KEY); - } + $iterator = new APCUIterator('/^' . $ns . '/', APC_ITER_KEY); $keys = []; foreach ($iterator as $item) { @@ -122,7 +119,7 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory $prefix = $this->getPrefix(); $prefix = preg_quote($prefix, '/'); - $iterator = new \APCUIterator('/^' . $prefix . '/', APC_ITER_KEY); + $iterator = new APCUIterator('/^' . $prefix . '/', APC_ITER_KEY); return apcu_delete($iterator); }