1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-09-23 19:18:21 +02:00

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

@ -44,8 +44,7 @@ We try to make sure vichan is compatible with all major web servers. vichan does
### Recommended
1. MySQL/MariaDB server >= 5.5.3
2. ImageMagick (command-line ImageMagick or GraphicsMagick preferred).
3. ~~[APC (Alternative PHP Cache)](http://php.net/manual/en/book.apc.php)~~,
[APCu (Alternative PHP Cache)](http://php.net/manual/en/book.apcu.php),
3. [APCu (Alternative PHP Cache)](http://php.net/manual/en/book.apcu.php),
[Memcached](http://www.php.net/manual/en/intro.memcached.php) or
[Redis](https://redis.io/docs/about/)

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));
}

View File

@ -876,11 +876,10 @@ if ($step == 0) {
),
array(
'category' => 'Misc',
'name' => 'Caching available (APC(u), Memcached or Redis)',
'result' => extension_loaded('apcu') || extension_loaded('apc') ||
extension_loaded('memcached') || extension_loaded('redis'),
'name' => 'Caching available (APCu, Memcached or Redis)',
'result' => extension_loaded('apcu') || extension_loaded('memcached') || extension_loaded('redis'),
'required' => false,
'message' => 'You will not be able to enable the additional caching system, designed to minimize SQL queries and significantly improve performance. <a href="http://php.net/manual/en/book.apc.php">APC</a> is the recommended method of caching, but <a href="http://www.php.net/manual/en/intro.memcached.php">Memcached</a> and <a href="http://pecl.php.net/package/redis">Redis</a> are also supported.'
'message' => 'You will not be able to enable the additional caching system, designed to minimize SQL queries and significantly improve performance. <a href="https://www.php.net/manual/en/book.apcu.php">APCu</a> is the recommended method of caching, but <a href="http://www.php.net/manual/en/intro.memcached.php">Memcached</a> and <a href="http://pecl.php.net/package/redis">Redis</a> are also supported.'
),
array(
'category' => 'Misc',

View File

@ -96,7 +96,6 @@ $pages = array(
// these pages aren't listed in the dashboard without $config['debug']
//'/debug/antispam' => 'debug_antispam',
//'/debug/recent' => 'debug_recent_posts',
//'/debug/apc' => 'debug_apc',
//'/debug/sql' => 'secure_POST debug_sql',
// This should always be at the end: