Clearing query cache works after second click

Hi guys,

I have the following situation: There are two linked objects (Users and Homes) of which both queries are cached. I have a button that changes the value of the home in the Users table and clears the query cache of both (see below). The problem is, that the first time I click the button, the user object is refreshed, but the 'old' home object is loaded. Only after the second time I click the button, the correct home will be retrieved. I have attached a video for extra insight. Can anyone help me with this?

Screencast from 31-12-23 00:51:58.webm
92.28KB

1
3 replies