From 9478291bf69f538b535f294035dc44396fdf177a Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Thu, 15 Feb 2018 20:27:03 -0800 Subject: [PATCH] Added Example snippet for setting up Redis cache (#4434) * Added Example snippet for setting up Redis cache * Update installation.rst * Update installation.rst --- docs/installation.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/installation.rst b/docs/installation.rst index b485cce49..a2d3a64d4 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -349,6 +349,16 @@ For setting your timeouts, this is done in the Superset metadata and goes up the "timeout searchpath", from your slice configuration, to your data source's configuration, to your database's and ultimately falls back into your global default defined in ``CACHE_CONFIG``. + +.. code-block:: python + + CACHE_CONFIG = { + 'CACHE_TYPE': 'redis', + 'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs) + 'CACHE_KEY_PREFIX': 'superset_results', + 'CACHE_REDIS_URL': 'redis://localhost:6379/0', + } + Deeper SQLAlchemy integration