diff --git a/README.md b/README.md index 4090e922..b8396706 100644 --- a/README.md +++ b/README.md @@ -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/) diff --git a/inc/cache.php b/inc/cache.php index 1c7680fb..0979138b 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -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': diff --git a/inc/config.php b/inc/config.php index 8c3e08b7..1d2b3966 100644 --- a/inc/config.php +++ b/inc/config.php @@ -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 diff --git a/inc/mod/pages.php b/inc/mod/pages.php index d1bcf939..f7c1ac47 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -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)); -} diff --git a/install.php b/install.php index 003efbe8..c174771b 100644 --- a/install.php +++ b/install.php @@ -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. APC is the recommended method of caching, but Memcached and Redis are also supported.' + 'message' => 'You will not be able to enable the additional caching system, designed to minimize SQL queries and significantly improve performance. APCu is the recommended method of caching, but Memcached and Redis are also supported.' ), array( 'category' => 'Misc', diff --git a/mod.php b/mod.php index 0ef8a36b..5018992d 100644 --- a/mod.php +++ b/mod.php @@ -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: