mistercrunch commented 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. 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
