Commit a90b6c20 authored by Euan游根明's avatar Euan游根明

perf: 文件路径

parent abb5d4a9
......@@ -211,7 +211,7 @@ class Nacos
* @return mixed|string
*/
public static function NacosGet($key){
$path =self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP'])).'-'.self::$configs['APP_ENV'];
$path =self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP']).'-'.self::$configs['APP_ENV']);
if (!file_exists($path)) {
return '';
}
......@@ -229,7 +229,7 @@ class Nacos
* @return false|int
*/
public static function NacosPut($key,$value){
$path = self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP'])).'-'.self::$configs['APP_ENV'];
$path = self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP']).'-'.self::$configs['APP_ENV']);
if (!file_exists($path)) {
$data[$key] = $value;
return file_put_contents($path, json_encode($data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment