enabled: Set to true to enable. Default false.
server: a string with the hostname of the memcached server. Can also
be an array of hostnames, if you've got more than one server.
+base: memcached uses key-value pairs to store data. We build long,
+ funny-looking keys to make sure we don't have any conflicts. The
+ base of the key is usually a simplified version of the site name
+ (like "Identi.ca" => "identica"), but you can overwrite this if
+ you need to. You can safely ignore it if you only have one
+ Laconica site using your memcached server.
+port: Port to connect to; defaults to 11211.
sphinx
------
function common_cache_key($extra)
{
- return 'laconica:' . common_keyize(common_config('site', 'name')) . ':' . $extra;
+ $base_key = common_config('memcached', 'base');
+
+ if (empty($base_key)) {
+ $base_key = common_keyize(common_config('site', 'name'));
+ }
+
+ return 'laconica:' . $base_key . ':' . $extra;
}
function common_keyize($str)