getCacheKayFromPath method
获取cacheKeyFromPath 根据请求地址和参数生成缓存key
Implementation
String getCacheKayFromPath(String? path, Map<String, dynamic>? params) {
String cacheKey = "";
if (path != null && path.length > 0) {
cacheKey = path;
} else {
throw new Exception("path is not null!!!");
}
if (params != null && params.length > 0) {
params.forEach((key, value) {
cacheKey = cacheKey + key + value;
});
}
cacheKey = MD5Utils.generateMD5(cacheKey);
return cacheKey;
}