I am using XML FW in Datapower where i am doing authentication and authorization using custom stylesheet. In order to enable caching, instead of directly calling LDAP from custom stylesheet, i called another XMLFW policy(say LdapXMLFWPolicy) which actually calls the LDAP. I am caching the call to this LdapXMLFWPolicy from the first XMLFW. This was working fine but problem comes with the new situation, where this XMLFW is called subsequently twice during password change functionality. In the first call, the request comes with the old password for password change and on success immediately another call comes with the new password for login but since the password is retrieved from the cache value of LdapXMLFWPolicy, I am not getting the old password still and the authentication is failing. Is there any way to tackle the situation?
Another point to be noted is that I have two datapower boxes running under the same load balancer. So we are not sure if the first request for password change and the second request for login with the new password will come to the same box or not?