Cómo deshabilitar el URLCache completamente con Alamofire

Usando Xcode 7.3 iOS 9.2 todo en Swift, ninguno de ese horrible Objetivo C He estado trabajando en esto por un tiempo y he estado alrededor del bloque tres veces. He intentado esta publicación aquí y no funcionó.http://www.mzan.com/article/32199494-alamofire-how-remove-cache.shtml

También he tratado de usar la documentación de Apple, pero eso es tan malo que no puedo entender si.

Entonces, lo que estoy haciendo es hacer dos llamadas de Alamofire a mi servidor. Uno para probar las credenciales de la información de inicio de sesión para ver si la entrada es correcta. El segundo es descargar y devolver la información del cliente para su visualización. Ambos funcionan bien cuando lo llamo por primera vez. El problema es que cuando salgo de la aplicación borro toda la información del usuario de la página. Pero cuando inicio sesión durante la misma sesión, llama correctamente a la primera, así que si ingreso el nombre de usuario o la contraseña incorrectos, devuelve falso incluso si inicio sesión correctamente la primera vez. Pero cuando descargo los datos del cliente, sigue descargando la información anterior desde la primera vez que accedí a la información del usuario. Utiliza el nuevo nombre de usuario y contraseña, pero aún descarga las cosas antiguas.

Estas son mis funciones de inicio de sesión y cierre de sesión:

//MARK: ButtonControllers
@IBAction func onLoginClick(sender: AnyObject) {

    errorMessageUI.text = "Checking Creditials"
    email = userNameInput.text!
    password = passwordInput.text!
    buildLoginUrl = checkLoginUrl + emailTag + email + passwordTag + password
    print(buildLoginUrl)
    print("Login Cred")
    checkLoginCredentials(buildLoginUrl)
}

@IBAction func onLogoutClick(sender: AnyObject) {

    //null out everything for logout
    email = ""
    password = ""
    self.loginInformation.setObject(self.email, forKey: "email")
    self.loginInformation.setObject(self.password, forKey: "password")
    self.loginInformation.synchronize()
    performSegueWithIdentifier("logoutSegue", sender: self)
    //self.view = LoginView
}

Y estas son las llamadas de alamofire

//MARK: Check Credentials Method
//Function to log into the server and retrive data
func checkLoginCredentials(myUrl : String)
{
    Alamofire.request(.GET, myUrl)
        .validate(statusCode: 200..<300)
        .responseString { response in
            print("Cred Success: \(response.result.isSuccess)")
            print("Cred Check: \(response.result.value)")
            //clear all url chache
            NSURLCache.sharedURLCache().removeAllCachedResponses()

            if response.result.value != nil
            {
                let checker : String = response.result.value!
                if checker.lowercaseString.rangeOfString("false") != nil {
                    self.canILogin = false
                    self.errorMessageUI.text = "Wrong username or Password try again"
                }else{
                    self.canILogin = true
                    print("Downloading Json file for customer info")
                    self.loadingImage.hidden = false
                    self.downlaodCustomerinfo(self.customerInfoUrl, myUser: self.email, myPass: self.password)
                    //defaults.setBool(textColorSwitch.on, forKey: "DarkText")
                    self.loginInformation.setObject(self.email, forKey: "email")
                    self.loginInformation.setObject(self.password, forKey: "password")
                    self.loginInformation.synchronize()
                }

                print("Login? " + self.canILogin.description ?? "none" )
            }else
            {
                //Stop the program from downloading anything to avoid crashes
                self.loadingImage.hidden = true
                print("I cannot download User Info")
                self.errorMessageUI.text = "A connection error occured"
                //set the json to be empty to avoid a crash
                //reset the json file incase there is anythig in it
                self.downloadJson = ""


            }

    }
}//end of checkLoginCredentials function

//MARK: Download Customer Infoamtion
func downlaodCustomerinfo(myUrl : String, myUser : String, myPass : String)
{

    //clear all url chache
    NSURLCache.sharedURLCache().removeAllCachedResponses()
    print("Username: " + myUser)
    print("Password: " + myPass)
    print("Download Url: " + myUrl )
    print("Jsonfile before download: " + self.downloadJson)
    Alamofire.request(.GET, myUrl)
        .authenticate(user: myUser, password: myPass)
        .validate(statusCode: 200..<300)
        .responseString { response in
            //print("Success: \(response.result.isSuccess)")
            print("Info Download: \(response.result.value)")


            if response.result.value != nil{

                self.downloadJson = response.result.value!
                print("Json file: " + self.downloadJson)
                self.parseCustomerInfo(self.downloadJson)
            }else
            {
                self.loadingImage.hidden = true
                print("I cannot download User Info")
                self.errorMessageUI.text = "A connection error occured"
                //set the json to be empty to avoid a crash
                self.downloadJson = "{}"
            }

    }
}//end of download

Código ACTUALIZADO: Causar que el sistema devuelva falso de la respuesta de Alamofire

  //Create a non-caching configuration.
    let config = NSURLSessionConfiguration.defaultSessionConfiguration()
    config.requestCachePolicy = .ReloadIgnoringLocalAndRemoteCacheData
    config.URLCache = nil
    //Create a manager with the non-caching configuration that you created above.
    let manager = Alamofire.Manager(configuration: config)

    print("Username for download: " + myUser)
    print("Password: " + myPass)
    manager.request(.GET, myUrl)
        .authenticate(user: myUser, password: myPass)
        .validate(statusCode: 200..<300)
        .responseString { response in
            //print("Success: \(response.result.isSuccess)")
            print("Info Download: \(response.result.value)")

            if response.result.value != nil{

                self.downloadJson = response.result.value!
                print("Json file: " + self.downloadJson)
                self.parseCustomerInfo(self.downloadJson)
            }else
            {
                self.loadingImage.hidden = true
                print("I cannot download User Info")
                self.errorMessageUI.text = "A connection error occured"
                //set the json to be empty to avoid a crash
                self.downloadJson = "{}"
            }

    }


}//end of downloadCustomer function

Respuestas a la pregunta(1)

Su respuesta a la pregunta