summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cache.php2
-rw-r--r--lib/common.php12
-rw-r--r--lib/default.php7
3 files changed, 15 insertions, 6 deletions
diff --git a/lib/cache.php b/lib/cache.php
index 63f582861..23657bbf3 100644
--- a/lib/cache.php
+++ b/lib/cache.php
@@ -78,7 +78,7 @@ class Cache
static function key($extra)
{
- $base_key = common_config('memcached', 'base');
+ $base_key = common_config('cache', 'base');
if (empty($base_key)) {
$base_key = common_keyize(common_config('site', 'name'));
diff --git a/lib/common.php b/lib/common.php
index 7fa1910af..b0e5c4390 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -210,6 +210,18 @@ if ($_db_name != 'statusnet' && !array_key_exists('ini_'.$_db_name, $config['db'
$config['db']['ini_'.$_db_name] = INSTALLDIR.'/classes/statusnet.ini';
}
+// Backwards compatibility
+
+if (array_key_exists('memcached', $config)) {
+ if ($config['memcached']['enabled']) {
+ addPlugin('Memcache', array('servers' => $config['memcached']['server']));
+ }
+
+ if (!empty($config['memcached']['base'])) {
+ $config['cache']['base'] = $config['memcached']['base'];
+ }
+}
+
function __autoload($cls)
{
if (file_exists(INSTALLDIR.'/classes/' . $cls . '.php')) {
diff --git a/lib/default.php b/lib/default.php
index 8a70ed3fa..eea11eb2b 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -147,11 +147,8 @@ $default =
array('enabled' => true,
'consumer_key' => null,
'consumer_secret' => null),
- 'memcached' =>
- array('enabled' => false,
- 'server' => 'localhost',
- 'base' => null,
- 'port' => 11211),
+ 'cache' =>
+ array('base' => null),
'ping' =>
array('notify' => array()),
'inboxes' =>