diff options
author | Evan Prodromou <evan@status.net> | 2010-01-02 21:16:59 -1000 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-02 21:16:59 -1000 |
commit | cc5534d180625b3d34f7039c0b95b034f3674a20 (patch) | |
tree | f2cc5a9fcdaa74f1d8bd678115a4ea0cb49114d3 /lib/common.php | |
parent | 1e1062ca9ca51ef618600459240bb0d497a47491 (diff) |
First version of Memcache plugin
Diffstat (limited to 'lib/common.php')
-rw-r--r-- | lib/common.php | 12 |
1 files changed, 12 insertions, 0 deletions
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')) { |