summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-15 16:09:40 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-15 16:09:40 -0700
commitfd290fc3f9a40a0d3be4e4ffc7d11846bf5295b8 (patch)
treef8195551fabc58d95272f980bd0f6cf423870763 /lib/util.php
parent177e4adf40bd41fc711c91fc6d16729b7f1b5796 (diff)
allow a configured base for cache keys
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php8
1 files changed, 7 insertions, 1 deletions
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)