We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func cacheKey(_ url: String, _ params: Dictionary<String, Any>?, _ dynamicParams: Dictionary<String, Any>?) -> String { /// c参数重复, params中过滤掉dynamicParams中的参数 if let filterParams = params?.filter({ (key, _) -> Bool in return dynamicParams?.contains(where: { (key1, _) -> Bool in return key != key1 }) ?? false }) { let str = "(url)" + "(sort(filterParams))" return MD5(str) } else { return MD5(url) } }
params
dynamicParams
contains方法命中就会停止本次循环,不能使用!=
The text was updated successfully, but these errors were encountered:
#29 参数过滤bug
1c19b95
No branches or pull requests
func cacheKey(_ url: String, _ params: Dictionary<String, Any>?, _ dynamicParams: Dictionary<String, Any>?) -> String {
/// c参数重复,
params
中过滤掉dynamicParams
中的参数if let filterParams = params?.filter({ (key, _) -> Bool in
return dynamicParams?.contains(where: { (key1, _) -> Bool in
return key != key1
}) ?? false
}) {
let str = "(url)" + "(sort(filterParams))"
return MD5(str)
} else {
return MD5(url)
}
}
contains方法命中就会停止本次循环,不能使用!=
The text was updated successfully, but these errors were encountered: