mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/15726] Implement selective purge in APCu cache driver
Correcting code formatting and whitespace PHPBB3-15726
This commit is contained in:
parent
7d4d9770cf
commit
bf9af92220
2 changed files with 5 additions and 4 deletions
7
phpBB/phpbb/cache/driver/apcu.php
vendored
7
phpBB/phpbb/cache/driver/apcu.php
vendored
|
@ -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();
|
||||
|
|
2
tests/cache/apcu_driver_test.php
vendored
2
tests/cache/apcu_driver_test.php
vendored
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue