[fix] Automatically add relevant Jinja methods to cache key if present (#9572)

* [fix] Adding URL params to cache key if present

* [cache] Wrapping Jinja methods

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2020-04-24 08:18:22 -07:00
committed by GitHub
parent 7386b017ab
commit 955a4fe792
7 changed files with 157 additions and 111 deletions

View File

@@ -79,15 +79,15 @@ Superset's Jinja context:
`Jinja's builtin filters <http://jinja.pocoo.org/docs/dev/templates/>`_ can be also be applied where needed.
.. autofunction:: superset.jinja_context.current_user_id
.. autofunction:: superset.jinja_context.ExtraCache.current_user_id
.. autofunction:: superset.jinja_context.current_username
.. autofunction:: superset.jinja_context.ExtraCache.current_username
.. autofunction:: superset.jinja_context.url_param
.. autofunction:: superset.jinja_context.ExtraCache.url_param
.. autofunction:: superset.jinja_context.filter_values
.. autofunction:: superset.jinja_context.CacheKeyWrapper.cache_key_wrapper
.. autofunction:: superset.jinja_context.ExtraCache.cache_key_wrapper
.. autoclass:: superset.jinja_context.PrestoTemplateProcessor
:members: