summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php1
-rw-r--r--lib/util.php8
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index ab61c812f..51204cede 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -152,6 +152,7 @@ $config =
'memcached' =>
array('enabled' => false,
'server' => 'localhost',
+ 'base' => null,
'port' => 11211),
'ping' =>
array('notify' => array()),
diff --git a/lib/util.php b/lib/util.php
index 49c6ae108..1d5708bd6 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1322,7 +1322,13 @@ function common_session_token()
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)