Question

Filter suggest values cached?

  • 14 October 2015
  • 11 replies
  • 986 views

I pick a (string) dimension and: filter


I select “is equal to” and then begin typing in the value box.


The suggested values are old. I know that I have added values; but the “select distinct” doesn’t get freshly re-run.


Why?


(For what it’s worth, the LookML is tied to a Postgres View, not an actual table. But I can’t see that would matter. if it does, it is worthy of documentation.)


11 replies

Userlevel 6
Badge

Hi @John_Norman,


For speed, we cache suggestions for about 6 hours. Right now there isn’t a way to change that. Most of the time, this is what you would like.


Sounds like having some control over the cache time is a feature you might need. Is this a common use case for you?

We can live with 6 hours.


(I told our team that the caching was 6 hours and the response was simply: “good to know.” So at present, we don’t see much urgency to be able to tweak this.)

Userlevel 4
Badge

@John_Norman I just came across this post. We now have a suggest_persist_for: parameter now which allows you to define how long the suggestions persist for at the field level.

Userlevel 7
Badge

is there a way to turn this off (i guess you can set it for such a small time). Also what other things will blow the cache for filter suggestions. I have been told before that if you make a change in the model/explore that it will do this but from what I have seen it didnt work.

I also clear cache for a whole explore using a datagroup. Are the filter suggestions included in this as I also dont think they are from what I have seen.

Thanks

@IanT At this time we cannot clear or blow the filter suggestion cache, the filter suggestion cache will not be cleared by a model change or via a datagroup. We can only set the time that the suggestions are persisted for using the suggest_persist_for:

If I were to enter a 24 hour value, how can I control the exact time the cache will be purged and rebuilt? I also wanted to ask if there’s plans to connect data group triggers to truncate/load filter suggest value caches in the future. Thanks!

Userlevel 3

Hey @gustavo_bermudez ! At this time there is no way to specify the exact time the cache is rebuilt. Data group triggers being applicable to suggested value caching would be a good way to be able to accomplish that. We can’t promise any particular date on that feature being available, but I’ll let the product team know that that is a feature you would like to see!

Userlevel 3

Just wanted to make a correction here: the suggest_persist_for parameter will only override explore-level caching mechanisms that cache individual queries for specific periods of time, such as the persist_for parameter for models/explores or the max_cache_age parameter within a datagroup. A sql_trigger in a datagroup will bust cache for all queries on explores persisted using that datagroup, including filter suggestion queries.

Yes some feature to clear the cache would be great, now I need to wait another day to finalize the Dashboard. There should be at least the option to clear those on dashboard level, got crazy the last hour why the filter didn’t picked up the needed value.

Userlevel 1

Appreciate this post existing, we’re running into the same issue. Is there a reason that refreshing a dashboard and clearing the cache wouldn’t also clear the suggestion cache? At least, this is what we were expecting. Would be nice to have this feature.

+1 to the last post. Clearing the cache on the dashboard should do the same for suggested filter values for that dashboard...

Reply