.servedFromCache returns false even though cache is activated in advenced query settings

The Query Library query and the import of it were created in the last 6 months, somewhere in July - September 2022 is my best recollection.

I'll see if I can replicate the issue with other Query Library queries and their imports.

@Kabirdas Any update here? It's one thing that this has now been a somewhat longstanding bug, but it's another that right in the Advanced tab the "Enable caching" option is just taunting us!

Can't that option at least be disabled or hidden for Query Library queries until the dev team figures this out? Otherwise it's very misleading.

I remember when I first reported this issue directly to support investigating what was happening took up an hour or two of my time making sure I hadn't messed up something else (it was in the context of a pretty hefty internal app).

I wonder how many other people might be saved the same trouble by a simple disclaimer / UI change.

@dguzzo, I don't have an update, but I can tell you that the ticket is in their engineering queue and that no one has picked it up yet. I have an ongoing chat thread with support going back to Dec 6, 2022 and every few weeks I ask for an update. Here are all the relevant responses I've been given regarding the status of the Query Library caching issue:

Dec 6, 2022

You're correct! This is indeed a known issue. I've updated the bug report and linked this thread so we can reach out with any updates or progress on the ticket. This is still in the queue to be picked up, so there's not a concrete timeline I can provide for you at the moment, unfortunately.

Dec 19, 2022

Unfortunately, I don't have an update on the Query Library caching issue yet -- it's still in the Engineering queue to be fixed. It does look like we intend to fix it, but there's no timeline I can provide for it at the moment.

Jan 17, 2023

I'm still waiting to hear back from our engineering team on a more clear timeline for this. It doesn't look like they've committed to a date yet, but I'm trying to get a more detailed report for you.

1 Like

Hey folks! Sorry for the late reply here, but thanks for the bumps! The eng team will be taking a closer look at this.

In the meantime, it looks like if you extract a query to the query library from an app it keeps whatever caching setting it had at the moment you extracted it:

If you'd like a query to run either cached on uncached you might try extracting two copies to the query library that are labeled accordingly:

I know this doesn't help with the confusion of seeing the setting after it's in the query library but hopefully it does help in some cases!

Hi @Kabirdas, just checking in to see if there are any updates on the Query Library caching issue. Any information on the progress of the fix would be helpful.

Hey @barton!

It looks like @dvdhsu already responded in a separate thread but I just want to confirm here as well that the devs are actively working on a fix :slightly_smiling_face:

It looks like they've released a fix. My reduced test case page is showing my query library query being cached.

1 Like

Hi @barton, we pushed out a fix for this three days ago. Thank you for reporting the bug, and for bumping it! Glad we could get it resolved. :slight_smile:

2 Likes

Thanks @dvdhsu! This was the biggest hurdle preventing us from moving our reports over from Looker Studio.

1 Like

@dvdhsu, do you know if this fix is included in the self-hosted release 2.115? Release notes don't indicate if it is.

Hey @derekchisholm, this should be included for self-hosted users at or above 2.117!

Thats Awesome! But how do I get to a version that, as far as i can tell, is yet to be released?

The release notes page indicates 2.115 is the latest release of self-hosted:
https://updates.retool.com/en?category=self-hosted%20release%20notes

It's the next release and should be available within a couple of weeks :slightly_smiling_face:

1 Like

Hey folks! Just want to give a heads up here that queries should be properly cached in Public Apps as of 2.123.0!

This is still not resolved. I am unable to invalidate the cache of a query in the Query Library. It does not work when using the UI:

image

and it does not work when using js directly:

image

No matter what, the cache is always returned!

image

1 Like

Hey @alanlindsay, thanks for surfacing this!

The dev team is shipping a fix that should go out with the 3.2.0 release. While this will re-enable query caching on public apps, it's important to note that the caching will not be user-specific. Since public apps don't have a concept of a particular user, queries will be cached across all users if you choose to do so!

@Kabirdas Great to hear, but in my case the app is not public anyway. Yes, I am using a shared query from the Query Library, but my app is private.

And if it wasn't clear from my previous explanation, the issue is that cache is used 100% of the time. I am unable to clear the cache programmatically or via the UI.

1 Like

Oh my apologies! I completely misread your post.

What version of Retool are you seeing this on? And is your query pinned to its latest version?

@Kabirdas Sorry for the delayed response, I was away. I am using Retool 3.3.0 and yes, the latest version is pinned.