allow a configured base for cache keys

This commit is contained in:
Evan Prodromou
2009-06-15 16:09:40 -07:00
parent 177e4adf40
commit fd290fc3f9
3 changed files with 15 additions and 1 deletions

View File

@@ -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)