From bf9af922208ad93c2afbe4fa9462f8914c8d4363 Mon Sep 17 00:00:00 2001 From: v12mike Date: Wed, 25 Jul 2018 19:36:25 +0100 Subject: [PATCH] [ticket/15726] Implement selective purge in APCu cache driver Correcting code formatting and whitespace PHPBB3-15726 --- phpBB/phpbb/cache/driver/apcu.php | 7 ++++--- tests/cache/apcu_driver_test.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/cache/driver/apcu.php b/phpBB/phpbb/cache/driver/apcu.php index 754fb1fce2..e40d5a376c 100644 --- a/phpBB/phpbb/cache/driver/apcu.php +++ b/phpBB/phpbb/cache/driver/apcu.php @@ -25,9 +25,10 @@ class apcu extends \phpbb\cache\driver\memory */ function purge() { - /* use an iterator to selectively clear our cache entries without - disturbing any other cache users - (e.g. other phpBB boards hosted on this server) */ + /* + Use an iterator to selectively clear our cache entries without disturbing + any other cache users (e.g. other phpBB boards hosted on this server) + */ apcu_delete(new \APCUIterator('#^' . $this->key_prefix . '#')); parent::purge(); diff --git a/tests/cache/apcu_driver_test.php b/tests/cache/apcu_driver_test.php index 2002fb66d8..57f640c313 100644 --- a/tests/cache/apcu_driver_test.php +++ b/tests/cache/apcu_driver_test.php @@ -61,7 +61,7 @@ class phpbb_cache_apcu_driver_test extends phpbb_cache_common_test_case $this->driver->purge(); } - public function test_purge() + public function test_purge() { /* add a cache entry which does not match our key */ $foreign_key = 'test_' . $this->driver->key_prefix . 'test';