mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
Remove APC support
This commit is contained in:
parent
0154e54f85
commit
2f88d0809f
@ -44,8 +44,7 @@ We try to make sure vichan is compatible with all major web servers. vichan does
|
|||||||
### Recommended
|
### Recommended
|
||||||
1. MySQL/MariaDB server >= 5.5.3
|
1. MySQL/MariaDB server >= 5.5.3
|
||||||
2. ImageMagick (command-line ImageMagick or GraphicsMagick preferred).
|
2. ImageMagick (command-line ImageMagick or GraphicsMagick preferred).
|
||||||
3. ~~[APC (Alternative PHP Cache)](http://php.net/manual/en/book.apc.php)~~,
|
3. [APCu (Alternative PHP Cache)](http://php.net/manual/en/book.apcu.php),
|
||||||
[APCu (Alternative PHP Cache)](http://php.net/manual/en/book.apcu.php),
|
|
||||||
[Memcached](http://www.php.net/manual/en/intro.memcached.php) or
|
[Memcached](http://www.php.net/manual/en/intro.memcached.php) or
|
||||||
[Redis](https://redis.io/docs/about/)
|
[Redis](https://redis.io/docs/about/)
|
||||||
|
|
||||||
|
@ -41,9 +41,6 @@ class Cache {
|
|||||||
self::init();
|
self::init();
|
||||||
$data = self::$cache->get($key);
|
$data = self::$cache->get($key);
|
||||||
break;
|
break;
|
||||||
case 'apc':
|
|
||||||
$data = apc_fetch($key);
|
|
||||||
break;
|
|
||||||
case 'apcu':
|
case 'apcu':
|
||||||
$data = apcu_fetch($key);
|
$data = apcu_fetch($key);
|
||||||
break;
|
break;
|
||||||
@ -92,9 +89,6 @@ class Cache {
|
|||||||
self::init();
|
self::init();
|
||||||
self::$cache->setex($key, $expires, json_encode($value));
|
self::$cache->setex($key, $expires, json_encode($value));
|
||||||
break;
|
break;
|
||||||
case 'apc':
|
|
||||||
apc_store($key, $value, $expires);
|
|
||||||
break;
|
|
||||||
case 'apcu':
|
case 'apcu':
|
||||||
apcu_store($key, $value, $expires);
|
apcu_store($key, $value, $expires);
|
||||||
break;
|
break;
|
||||||
@ -127,9 +121,6 @@ class Cache {
|
|||||||
self::init();
|
self::init();
|
||||||
self::$cache->del($key);
|
self::$cache->del($key);
|
||||||
break;
|
break;
|
||||||
case 'apc':
|
|
||||||
apc_delete($key);
|
|
||||||
break;
|
|
||||||
case 'apcu':
|
case 'apcu':
|
||||||
apcu_delete($key);
|
apcu_delete($key);
|
||||||
break;
|
break;
|
||||||
@ -154,8 +145,6 @@ class Cache {
|
|||||||
if (!self::$cache)
|
if (!self::$cache)
|
||||||
self::init();
|
self::init();
|
||||||
return self::$cache->flush();
|
return self::$cache->flush();
|
||||||
case 'apc':
|
|
||||||
return apc_clear_cache('user');
|
|
||||||
case 'apcu':
|
case 'apcu':
|
||||||
return apcu_clear_cache('user');
|
return apcu_clear_cache('user');
|
||||||
case 'php':
|
case 'php':
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$config['cache']['enabled'] = 'php';
|
$config['cache']['enabled'] = 'php';
|
||||||
// $config['cache']['enabled'] = 'apc';
|
// $config['cache']['enabled'] = 'apcu';
|
||||||
// $config['cache']['enabled'] = 'memcached';
|
// $config['cache']['enabled'] = 'memcached';
|
||||||
// $config['cache']['enabled'] = 'redis';
|
// $config['cache']['enabled'] = 'redis';
|
||||||
// $config['cache']['enabled'] = 'fs';
|
// $config['cache']['enabled'] = 'fs';
|
||||||
@ -1306,7 +1306,6 @@
|
|||||||
$config['file_mod_debug_antispam'] = 'mod/debug/antispam.html';
|
$config['file_mod_debug_antispam'] = 'mod/debug/antispam.html';
|
||||||
$config['file_mod_debug_recent_posts'] = 'mod/debug/recent_posts.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_sql'] = 'mod/debug/sql.html';
|
||||||
$config['file_mod_debug_apc'] = 'mod/debug/apc.html';
|
|
||||||
|
|
||||||
// Board directory, followed by a forward-slash (/).
|
// Board directory, followed by a forward-slash (/).
|
||||||
$config['board_path'] = '%s/';
|
$config['board_path'] = '%s/';
|
||||||
@ -1707,8 +1706,6 @@
|
|||||||
$config['mod']['news_delete'] = ADMIN;
|
$config['mod']['news_delete'] = ADMIN;
|
||||||
// Execute un-filtered SQL queries on the database (?/debug/sql)
|
// Execute un-filtered SQL queries on the database (?/debug/sql)
|
||||||
$config['mod']['debug_sql'] = DISABLED;
|
$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)
|
// Edit the current configuration (via web interface)
|
||||||
$config['mod']['edit_config'] = ADMIN;
|
$config['mod']['edit_config'] = ADMIN;
|
||||||
// View ban appeals
|
// View ban appeals
|
||||||
|
@ -3001,25 +3001,3 @@ function mod_debug_sql() {
|
|||||||
|
|
||||||
mod_page(_('Debug: SQL'), $config['file_mod_debug_sql'], $args);
|
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));
|
|
||||||
}
|
|
||||||
|
@ -876,11 +876,10 @@ if ($step == 0) {
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'category' => 'Misc',
|
'category' => 'Misc',
|
||||||
'name' => 'Caching available (APC(u), Memcached or Redis)',
|
'name' => 'Caching available (APCu, Memcached or Redis)',
|
||||||
'result' => extension_loaded('apcu') || extension_loaded('apc') ||
|
'result' => extension_loaded('apcu') || extension_loaded('memcached') || extension_loaded('redis'),
|
||||||
extension_loaded('memcached') || extension_loaded('redis'),
|
|
||||||
'required' => false,
|
'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(
|
array(
|
||||||
'category' => 'Misc',
|
'category' => 'Misc',
|
||||||
|
1
mod.php
1
mod.php
@ -96,7 +96,6 @@ $pages = array(
|
|||||||
// these pages aren't listed in the dashboard without $config['debug']
|
// these pages aren't listed in the dashboard without $config['debug']
|
||||||
//'/debug/antispam' => 'debug_antispam',
|
//'/debug/antispam' => 'debug_antispam',
|
||||||
//'/debug/recent' => 'debug_recent_posts',
|
//'/debug/recent' => 'debug_recent_posts',
|
||||||
//'/debug/apc' => 'debug_apc',
|
|
||||||
//'/debug/sql' => 'secure_POST debug_sql',
|
//'/debug/sql' => 'secure_POST debug_sql',
|
||||||
|
|
||||||
// This should always be at the end:
|
// This should always be at the end:
|
||||||
|
Loading…
Reference in New Issue
Block a user