Mendix Cache issue ?

0
I have a microflow that retrieves password from secret server everytime and then does actions on the database using this retrived password.  Sometimes i notice that randomly when the password of the account is changed on the secret server, mendix does retrieve the changed password, as seen in the logs ,  but when it tries to do actions based on the new password, it fails with invalid login and then account gets locked.  When i restart mendix , the same microflow will work fine without any issue. so this indicates that mendix might be keeping some cache info which is causing this issue randomly. Any light that can be shed on this,  is there any cache clear or something that can be run regularly to avoid this issue.
asked
1 answers
1

Hi JP,

To address the cache clearing issue in the microflow, you can take the following steps:

  1. Use Non-Persistent Entities:

    • Design your microflows to use non-persistent entities where caching might be an issue. This will ensure that data is not cached.
  2. Implement a Custom Java Action to Clear Cache:

    • Create a custom Java action to clear the cache for Module.Entity.

I have created a custom cache clearing Java action, which successfully clears the cache. You can use it as follows:

  1. Retrieve the password from the secret server.
  2. Call the ClearCache Java action.
  3. Continue with the database actions using the retrieved password.

Best regards,

Amit G

answered