Use human-readable cache keys in Redis

This commit is contained in:
Kijin Sung 2015-08-19 09:30:32 +09:00
parent f50d5dd9fe
commit 8b6e06c7a3

View file

@ -98,7 +98,12 @@ class CacheRedis extends CacheBase
*/
function getKey($key)
{
return sha1(_XE_PATH_ . $key);
static $prefix = null;
if($prefix === null)
{
$prefix = substr(sha1(_XE_PATH_), 0, 12) . ':';
}
return $prefix . $key;
}
/**