...
|
...
|
@@ -83,6 +83,29 @@ class Cache |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 直接查询缓存,不对key做任何处理
|
|
|
*/
|
|
|
public static function getBy($key, $node = 'master')
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
try {
|
|
|
// WINDOWS
|
|
|
if (DIRECTORY_SEPARATOR === '\\') {
|
|
|
$result = HoodCache::Memcache($node)->getBy($key);
|
|
|
}
|
|
|
// LINUX
|
|
|
else {
|
|
|
$result = HoodCache::Memcached($node)->getBy($key);
|
|
|
}
|
|
|
} catch (Exception $e) {
|
|
|
$result = array();
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 清除缓存
|
|
|
*
|
|
|
* @param string $key 键名
|
...
|
...
|
|