mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
Use human-readable cache keys in Redis
This commit is contained in:
parent
f50d5dd9fe
commit
8b6e06c7a3
1 changed files with 6 additions and 1 deletions
7
classes/cache/CacheRedis.class.php
vendored
7
classes/cache/CacheRedis.class.php
vendored
|
|
@ -98,7 +98,12 @@ class CacheRedis extends CacheBase
|
||||||
*/
|
*/
|
||||||
function getKey($key)
|
function getKey($key)
|
||||||
{
|
{
|
||||||
return sha1(_XE_PATH_ . $key);
|
static $prefix = null;
|
||||||
|
if($prefix === null)
|
||||||
|
{
|
||||||
|
$prefix = substr(sha1(_XE_PATH_), 0, 12) . ':';
|
||||||
|
}
|
||||||
|
return $prefix . $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue