You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/07/02 04:06:57 UTC

[GitHub] [incubator-superset] mistercrunch edited a comment on issue #7580: Queries using current_username() method do not run properly when caching is enabled

mistercrunch edited a comment on issue #7580: Queries using current_username() method do not run properly when caching is enabled
URL: https://github.com/apache/incubator-superset/issues/7580#issuecomment-507509815
 
 
   @duffar12 unfortunately we cannot use the `SQL` of the query directly as the basis for the cache key. The main issue has to do with relative time filters (ie `24 hours ago`) being different at each run (and therefore would never use the cache). Here's what we do now:
   https://github.com/apache/incubator-superset/blob/master/superset/viz.py#L347-L369
   
   We use the query_object's key/values, and inject the raw time filter as opposed to the "rendered" one.
   
   Given that context, it seems like @villebro 's solution may work. Unclear to me how `cache_key_wrapper` gets scoped to the template object only though, but there should be a way to implement something like that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org