mirror of
https://github.com/Circlepuller/Tinyboard.git
synced 2025-01-17 05:18:28 +01:00
Removed Memcached support due to security concerns.
This commit is contained in:
parent
4b4a8f12bf
commit
75d310786c
@ -38,7 +38,7 @@ it need one.
|
||||
2. ImageMagick (command-line ImageMagick or GraphicsMagick preferred).
|
||||
3. [APC (Alternative PHP Cache)](http://php.net/manual/en/book.apc.php),
|
||||
[XCache](http://xcache.lighttpd.net/) or
|
||||
[Memcached](http://www.php.net/manual/en/intro.memcached.php)
|
||||
[Redis](http://pecl.php.net/package/redis)
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
@ -12,10 +12,6 @@ class Cache {
|
||||
global $config;
|
||||
|
||||
switch ($config['cache']['enabled']) {
|
||||
case 'memcached':
|
||||
self::$cache = new Memcached();
|
||||
self::$cache->addServers($config['cache']['memcached']);
|
||||
break;
|
||||
case 'redis':
|
||||
self::$cache = new Redis();
|
||||
self::$cache->connect($config['cache']['redis'][0], $config['cache']['redis'][1]);
|
||||
@ -36,11 +32,6 @@ class Cache {
|
||||
|
||||
$data = false;
|
||||
switch ($config['cache']['enabled']) {
|
||||
case 'memcached':
|
||||
if (!self::$cache)
|
||||
self::init();
|
||||
$data = self::$cache->get($key);
|
||||
break;
|
||||
case 'apc':
|
||||
$data = apc_fetch($key);
|
||||
break;
|
||||
@ -82,11 +73,6 @@ class Cache {
|
||||
$expires = $config['cache']['timeout'];
|
||||
|
||||
switch ($config['cache']['enabled']) {
|
||||
case 'memcached':
|
||||
if (!self::$cache)
|
||||
self::init();
|
||||
self::$cache->set($key, $value, $expires);
|
||||
break;
|
||||
case 'redis':
|
||||
if (!self::$cache)
|
||||
self::init();
|
||||
@ -117,7 +103,6 @@ class Cache {
|
||||
$key = $config['cache']['prefix'] . $key;
|
||||
|
||||
switch ($config['cache']['enabled']) {
|
||||
case 'memcached':
|
||||
case 'redis':
|
||||
if (!self::$cache)
|
||||
self::init();
|
||||
@ -146,10 +131,6 @@ class Cache {
|
||||
global $config;
|
||||
|
||||
switch ($config['cache']['enabled']) {
|
||||
case 'memcached':
|
||||
if (!self::$cache)
|
||||
self::init();
|
||||
return self::$cache->flush();
|
||||
case 'apc':
|
||||
return apc_clear_cache('user');
|
||||
case 'php':
|
||||
|
@ -118,7 +118,6 @@
|
||||
$config['cache']['enabled'] = 'php';
|
||||
// $config['cache']['enabled'] = 'xcache';
|
||||
// $config['cache']['enabled'] = 'apc';
|
||||
// $config['cache']['enabled'] = 'memcached';
|
||||
// $config['cache']['enabled'] = 'redis';
|
||||
// $config['cache']['enabled'] = 'fs';
|
||||
|
||||
@ -128,11 +127,6 @@
|
||||
// Optional prefix if you're running multiple Tinyboard instances on the same machine.
|
||||
$config['cache']['prefix'] = '';
|
||||
|
||||
// Memcached servers to use. Read more: http://www.php.net/manual/en/memcached.addservers.php
|
||||
$config['cache']['memcached'] = array(
|
||||
array('localhost', 11211)
|
||||
);
|
||||
|
||||
// Redis server to use. Location, port, password, database id.
|
||||
// Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
|
||||
// Tinyboard to use.
|
||||
|
@ -876,11 +876,11 @@ if ($step == 0) {
|
||||
),
|
||||
array(
|
||||
'category' => 'Misc',
|
||||
'name' => 'Caching available (APC, XCache, Memcached or Redis)',
|
||||
'name' => 'Caching available (APC, XCache, or Redis)',
|
||||
'result' => extension_loaded('apc') || extension_loaded('xcache')
|
||||
|| extension_loaded('memcached') || extension_loaded('redis'),
|
||||
|| 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://xcache.lighttpd.net/">XCache</a>, <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="http://php.net/manual/en/book.apc.php">APC</a> is the recommended method of caching, but <a href="http://xcache.lighttpd.net/">XCache</a>, and <a href="http://pecl.php.net/package/redis">Redis</a> are also supported.'
|
||||
),
|
||||
array(
|
||||
'category' => 'Misc',
|
||||
|
Loading…
x
Reference in New Issue
Block a user