Skip to content

Commit 90313a4

Browse files
szachovyCopilot
andcommitted
Add Superset metastore and explore form data caching
Configure DATA_CACHE_CONFIG (1h TTL) and EXPLORE_FORM_DATA_CACHE_CONFIG (24h TTL) to cache metadata queries in Redis. Dashboard loads trigger 5-20 metadata queries that rarely change but were re-queried every time. Closes #79 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ab8ce7 commit 90313a4

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
* Dependabot updates for `github-actions` and `terraform` ecosystems. (#29)
1616
* CI workflow to build and push service images to GitHub Container Registry on master merge. (#97)
1717
* Pull-first with local build fallback for container images during deployment. (#97)
18+
* Superset metastore and explore form data caching via Redis. (#79)
1819

1920
### Changed
2021

services/superset/superset_config.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,15 @@ class CeleryConfig: # pylint: disable=too-few-public-methods
4949
"CACHE_KEY_PREFIX": "superset_filter_cache",
5050
"CACHE_REDIS_URL": "redis://redis:6379/0"
5151
}
52+
DATA_CACHE_CONFIG = {
53+
"CACHE_TYPE": "RedisCache",
54+
"CACHE_DEFAULT_TIMEOUT": 3600,
55+
"CACHE_KEY_PREFIX": "superset_data_cache",
56+
"CACHE_REDIS_URL": "redis://redis:6379/0"
57+
}
58+
EXPLORE_FORM_DATA_CACHE_CONFIG = {
59+
"CACHE_TYPE": "RedisCache",
60+
"CACHE_DEFAULT_TIMEOUT": 86400,
61+
"CACHE_KEY_PREFIX": "superset_explore_cache",
62+
"CACHE_REDIS_URL": "redis://redis:6379/0"
63+
}

0 commit comments

Comments
 (0)