Remove APC support

This commit is contained in:
Zankaria
2024-03-07 14:32:23 +01:00
parent 0154e54f85
commit 2f88d0809f
6 changed files with 5 additions and 44 deletions

View File

@@ -41,9 +41,6 @@ class Cache {
self::init();
$data = self::$cache->get($key);
break;
case 'apc':
$data = apc_fetch($key);
break;
case 'apcu':
$data = apcu_fetch($key);
break;
@@ -92,9 +89,6 @@ class Cache {
self::init();
self::$cache->setex($key, $expires, json_encode($value));
break;
case 'apc':
apc_store($key, $value, $expires);
break;
case 'apcu':
apcu_store($key, $value, $expires);
break;
@@ -127,9 +121,6 @@ class Cache {
self::init();
self::$cache->del($key);
break;
case 'apc':
apc_delete($key);
break;
case 'apcu':
apcu_delete($key);
break;
@@ -154,8 +145,6 @@ class Cache {
if (!self::$cache)
self::init();
return self::$cache->flush();
case 'apc':
return apc_clear_cache('user');
case 'apcu':
return apcu_clear_cache('user');
case 'php':

View File

@@ -121,7 +121,7 @@
*/
$config['cache']['enabled'] = 'php';
// $config['cache']['enabled'] = 'apc';
// $config['cache']['enabled'] = 'apcu';
// $config['cache']['enabled'] = 'memcached';
// $config['cache']['enabled'] = 'redis';
// $config['cache']['enabled'] = 'fs';
@@ -1306,7 +1306,6 @@
$config['file_mod_debug_antispam'] = 'mod/debug/antispam.html';
$config['file_mod_debug_recent_posts'] = 'mod/debug/recent_posts.html';
$config['file_mod_debug_sql'] = 'mod/debug/sql.html';
$config['file_mod_debug_apc'] = 'mod/debug/apc.html';
// Board directory, followed by a forward-slash (/).
$config['board_path'] = '%s/';
@@ -1707,8 +1706,6 @@
$config['mod']['news_delete'] = ADMIN;
// Execute un-filtered SQL queries on the database (?/debug/sql)
$config['mod']['debug_sql'] = DISABLED;
// Look through all cache values for debugging when APC is enabled (?/debug/apc)
$config['mod']['debug_apc'] = ADMIN;
// Edit the current configuration (via web interface)
$config['mod']['edit_config'] = ADMIN;
// View ban appeals

View File

@@ -3001,25 +3001,3 @@ function mod_debug_sql() {
mod_page(_('Debug: SQL'), $config['file_mod_debug_sql'], $args);
}
function mod_debug_apc() {
global $config;
if (!hasPermission($config['mod']['debug_apc']))
error($config['error']['noaccess']);
if ($config['cache']['enabled'] != 'apc')
error('APC is not enabled.');
$cache_info = apc_cache_info('user');
// $cached_vars = new APCIterator('user', '/^' . $config['cache']['prefix'] . '/');
$cached_vars = array();
foreach ($cache_info['cache_list'] as $var) {
if ($config['cache']['prefix'] != '' && strpos(isset($var['key']) ? $var['key'] : $var['info'], $config['cache']['prefix']) !== 0)
continue;
$cached_vars[] = $var;
}
mod_page(_('Debug: APC'), $config['file_mod_debug_apc'], array('cached_vars' => $cached_vars));
}