-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the query_obj as the basis for the cache key #4260
Conversation
When we recently moved from hashing form_data to define the cache_key towards using the rendered query instead, it made is such that non deterministic form control values like relative times specified in "from" and "until" time bound resulted in making those miss cache 100% of the time. Here we move away from using the rendered query and using the query_obj instead.
@mistercrunch doesn't the query object include the form_data and thus wouldn't this issue still persist? #3840 |
@john-bodley oh man. Good catch. I had forgotten that the Now I still think this is the right high level approach, but that we need to mitigate the templating use case somehow. Maybe have users opt-in on passing the |
What about I deprecate using Here's the query to figure that out: SELECT * FROM tables WHERE sql like '%{{%form_data%}}%' |
@mistercrunch I slight tweak to the query, but
returned zero rows (ran in SQL Lab). |
👍 |
LGTM |
* Use the query_obj as the basis for the cache key When we recently moved from hashing form_data to define the cache_key towards using the rendered query instead, it made is such that non deterministic form control values like relative times specified in "from" and "until" time bound resulted in making those miss cache 100% of the time. Here we move away from using the rendered query and using the query_obj instead. * Deprecating using form_data in templates
* Use the query_obj as the basis for the cache key When we recently moved from hashing form_data to define the cache_key towards using the rendered query instead, it made is such that non deterministic form control values like relative times specified in "from" and "until" time bound resulted in making those miss cache 100% of the time. Here we move away from using the rendered query and using the query_obj instead. * Deprecating using form_data in templates
When we recently moved from hashing form_data to define the cache_key
towards using the rendered query instead,
it made is such that non deterministic (time-relative) form
control values like relative times specified in "from" and "until" time
bound resulted in making those miss cache 100% of the time.
Here we move away from using the rendered query and using the query_obj
instead. For this to work, we need to remove
['from_dttm', 'to_dttm']
and add some keys (['since', 'until', 'datasource']
) fromform_data