Filter Suggest Cache

Hi,

I am using a persist_with with datagroup at the model level.
Also, I have a parameter suggest_persist_for on one of the fields, used to filter the data.
I found an old topic from 2017, that says that these two are not connected and filter suggest cache is not controlled by the datagroup.

Is this still the case with the latest versions of looker? If this is fixed, which one takes precedence?
From internal testing I see the chart is properly refreshed with the data group. But it is hard to say for the filter - it is definitely not persisted for 60 minutes, but I would like to confirm the current logic.

1 3 944
3 REPLIES 3

Hey Arkadi,

Yes, that’s correct; the suggest_persist_for parameter will determine the cache for filter suggestions independent of any caching policies set on the explore itself. If the filter suggestion cache behavior does not seem to match what you have in the suggest_persist_for parameter, could you describe what you’ve set for that parameter and when the suggestions are refreshing?

The reason I am asking is I see a different behavior on 6.22.
I have a datagroup with a SQL trigger on the model. Also, I have suggest_persist_for on several fields in different explores inside of the model.
When I set suggest_persist_for: 0 seconds I see sql query is triggered every time I access the filter - as expected.

When I set suggest_persist_for to 60 minutes, it is different.
If I trigger a datagroup change, data charts get refreshed from the database - which is expected. However, when I click filter on the Lookml dashboard, I see them refreshed as well when the datagroup is refreshed. Which I would not expect based on the answer above.
So what I am observing, filter fields are refreshed on datagroup trigger or suggest_persist_for whichever comes first.
I ran the test 5 times and I see filters refreshed with datagroup, not with suggest_persist_for: 60 minutes

Hey Arkadi,

I did some additional research to confirm, and your description of the filter suggestion caching behavior is correct. It turns out that 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. Let me know if you have any questions.

Top Labels in this Space
Top Solution Authors