mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Fix duplication of key group version in third-party modules
This commit is contained in:
parent
26c5a18a5b
commit
ba9adb2f6e
2 changed files with 3 additions and 4 deletions
2
classes/cache/CacheHandler.class.php
vendored
2
classes/cache/CacheHandler.class.php
vendored
|
|
@ -148,7 +148,7 @@ class CacheHandler extends Handler
|
||||||
*/
|
*/
|
||||||
public function getGroupKey($keyGroupName, $key)
|
public function getGroupKey($keyGroupName, $key)
|
||||||
{
|
{
|
||||||
return Rhymix\Framework\Cache::getRealKey($keyGroupName . ':' . $key, false);
|
return $keyGroupName . ':' . $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -298,16 +298,15 @@ class Cache
|
||||||
* Get the actual key used by Rhymix.
|
* Get the actual key used by Rhymix.
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param bool $add_prefix (optional)
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getRealKey($key, $add_prefix = true)
|
public static function getRealKey($key)
|
||||||
{
|
{
|
||||||
if (preg_match('/^([^:]+):(.+)$/i', $key, $matches))
|
if (preg_match('/^([^:]+):(.+)$/i', $key, $matches))
|
||||||
{
|
{
|
||||||
$key = $matches[1] . '#' . self::getGroupVersion($matches[1]) . ':' . $matches[2];
|
$key = $matches[1] . '#' . self::getGroupVersion($matches[1]) . ':' . $matches[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($add_prefix ? self::$_prefix : '') . $key;
|
return self::$_prefix . $key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue