Make cache type selectable based on config value

Provie a mechanism to specify cache type from NONE, APC, or MEMCACHE
based on a config variable.

If MEMCACHE type is selected, a list of servers can be specified to
provide multiserver support. Note that php-memcaced is required for
MEMCACHE support.

Lukas: Minor commenting style fixes.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
elij 2011-05-29 23:27:55 +02:00 committed by Lukas Fleischer
parent 888db089c5
commit 5853097561
3 changed files with 92 additions and 46 deletions

View file

@ -24,6 +24,15 @@ define("DEFAULT_LANG", "en");
# development. Should not be enabled in production. Default to 0 (off).
define("SQL_DEBUG", 0);
# Set cache type. Either "APC", "MEMCACHE", or "NONE". Defaults to NONE.
#define("CACHE_TYPE", "APC");
#define("CACHE_TYPE", "MEMCACHE");
# If using memcache cache_type, list servers. You can separate multiple servers
# with a comma, ex: '127.0.0.1:11211,127.0.0.1:11212'. If undefined, defaults
# to '127.0.0.1:11211'.
#define("MEMCACHE_SERVERS", '127.0.0.1:11211');
# Languages we have translations for
$SUPPORTED_LANGS = array(
"ca" => "Català",