diff --git a/core/lib/Drupal/Core/Cache/ApcuBackend.php b/core/lib/Drupal/Core/Cache/ApcuBackend.php index d64ab7f..00c6aa5 100644 --- a/core/lib/Drupal/Core/Cache/ApcuBackend.php +++ b/core/lib/Drupal/Core/Cache/ApcuBackend.php @@ -237,6 +237,8 @@ public function deleteMultiple(array $cids) { */ public function deleteAll() { apc_delete(new \APCIterator('user', '/^' . preg_quote($this->binPrefix, '/') . '/')); + apc_delete(new \APCIterator('user', '/^' . preg_quote($this->deletionsTagsPrefix, '/') . '/')); + apc_delete(new \APCIterator('user', '/^' . preg_quote($this->invalidationsTagsPrefix, '/') . '/')); } /** @@ -252,8 +254,6 @@ public function garbageCollection() { */ public function removeBin() { $this->deleteAll(); - apc_delete(new \APCIterator('user', '/^' . preg_quote($this->deletionsTagsPrefix, '/') . '/')); - apc_delete(new \APCIterator('user', '/^' . preg_quote($this->invalidationsTagsPrefix, '/') . '/')); } /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/ApcuBackendUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/ApcuBackendUnitTest.php index 8da6243..4c3907c 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/ApcuBackendUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/ApcuBackendUnitTest.php @@ -11,17 +11,6 @@ /** * Tests the APC cache backend. - * - * @todo APC still contains the following variables after each tearDown() of a - * test method: - * - cache::theme_registry:build:modules - * - cache::theme_registry:stark - * - tags::* - * The first two are caused by CacheArray::__destruct() being invoked *after* - * TestBase::tearDown() reset static caches. - * Cache tag invalidation counters, however, are not flushed by design. It - * might be possible to flush them in a tearDown() override method in this - * class though. */ class ApcuBackendUnitTest extends GenericCacheBackendUnitTestBase { @@ -50,7 +39,6 @@ protected function checkRequirements() { } protected function createCacheBackend($bin) { - return new ApcuBackend($bin, 'test'); + return new ApcuBackend($bin, $this->databasePrefix); } - }