mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/16432] Display APCu Cache notice when handling extensions through CLI
PHPBB3-16432
This commit is contained in:
13
phpBB/phpbb/cache/driver/apcu.php
vendored
13
phpBB/phpbb/cache/driver/apcu.php
vendored
@@ -25,11 +25,14 @@ class apcu extends \phpbb\cache\driver\memory
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
/*
|
||||
* Use an iterator to selectively delete 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 . '#'));
|
||||
if (PHP_SAPI !== 'cli' || @ini_get('apc.enable_cli'))
|
||||
{
|
||||
/*
|
||||
* Use an iterator to selectively delete 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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user