-
In an application I have a query which imports a rest query from the query library.
-
I found a bug in this query. The query in the library needs to be modified. I change the arguments to the HTTP POST.
-
Back in the app I am sure to Sync and make sure I am using the latest version of the query from the library.
-
I test the modified query (preview mode in IDE) and the fix works.
-
Later a colleague reports it is still not working for him. I double-checked. I have made a new release, and he is using the current version. Version control is Retool native; not Github/external.
-
It turns out the key difference is that my colleague is using the app as an anonymous user. They are not logged on to Retool and they are not in the IDE. They are just using the Public URL.
-
I theorize that there is some caching issue. The public access path to the app is picking up changes in the app (such as UI design, the version ID string I show in the UI, etc. But it is not picking up changes in library queries.
-
I fiddle with the library query trying to make changes that will trigger a cache flush. I confirm caching of query RESULTS is turned off. But what we are talking about here is the query text itself.
-
We wait 24+ hours and test again. Thinking surely the cache will timeout eventually. No luck.
-
For unrelated reasons I decided to change the REST endpoint the library query uses. I created an entirely new library query (“resource”) and I connected the query embedded in the app to that new resource.
-
At this point, the anonymous user is now seeing the new query and getting correct data. So, my “caching” problem is “fixed”. However, were I to make a minor change to the library query I do not know if the same problem will recur. And it is not clear this has anything to do with caching. More a question of the anonymous user running different (older) code than a Retool logged on user.
1 Like
Hello @Roland_Alden!
Thank you so much for this high quality and detailed post!
I have sent in a bug report to engineering team and will circle back with any news, updates or further questions
1 Like