{"record":{"id":"5727ae38f5c3871f","repo":"apache/superset","slug":"unsupported-cache-backend-configuration","errorCode":null,"errorMessage":"Unsupported cache backend configuration","messagePattern":"Unsupported cache backend configuration","errorType":"exception","errorClass":"UnsupportedCacheBackendError","httpStatus":null,"severity":"error","filePath":"superset/async_events/async_query_manager.py","lineNumber":100,"sourceCode":"        return prefix + str(last + 1)\n    except Exception:  # pylint: disable=broad-except\n        return entry_id\n\n\ndef get_cache_backend(\n    config: dict[str, Any],\n) -> RedisCacheBackend | RedisSentinelCacheBackend:\n    cache_config = config.get(\"GLOBAL_ASYNC_QUERIES_CACHE_BACKEND\", {})\n    cache_type = cache_config.get(\"CACHE_TYPE\")\n\n    if cache_type == \"RedisCache\":\n        return RedisCacheBackend.from_config(cache_config)\n\n    if cache_type == \"RedisSentinelCache\":\n        return RedisSentinelCacheBackend.from_config(cache_config)\n\n    # TODO: Expand cache backend options.\n    raise UnsupportedCacheBackendError(\"Unsupported cache backend configuration\")\n\n\nclass AsyncQueryManager:\n    MAX_EVENT_COUNT = 100\n    STATUS_PENDING = \"pending\"\n    STATUS_RUNNING = \"running\"\n    STATUS_ERROR = \"error\"\n    STATUS_DONE = \"done\"\n    STATUS_CANCELLED = \"cancelled\"\n    # Redis key prefix (within the GAQ stream namespace) for the per-job record\n    # that authorizes cancellation and flags a job as cancelled for the worker.\n    _JOB_REGISTRY_PREFIX = \"job-cancel:\"\n\n    def __init__(self) -> None:\n        super().__init__()\n        self._cache: Optional[BaseCache] = None\n        self._stream_prefix: str = \"\"\n        self._stream_limit: Optional[int]","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/async_events/async_query_manager.py#L82-L118","documentation":"UnsupportedCacheBackendError is raised by get_cache_backend() (async query manager setup) when GLOBAL_ASYNC_QUERIES_CACHE_BACKEND.CACHE_TYPE in Flask config is neither 'RedisCache' nor 'RedisSentinelCache'. Global async queries (GAQ) stream results over Redis streams, so only those two Redis backends are implemented (the TODO in the source confirms more options are pending).","triggerScenarios":"Enabling GLOBAL_ASYNC_QUERIES in superset_config.py while GLOBAL_ASYNC_QUERIES_CACHE_BACKEND is left as the default {} (CACHE_TYPE None) or set to something like 'SimpleCache', 'FileSystemCache', or 'MemoryCache'. Also setting only CACHE_CONFIG/DATA_CACHE_CONFIG to Redis but not the GAQ-specific block.","commonSituations":"Operators enabling async queries for the first time and assuming the general CACHE_CONFIG applies to GAQ; staging setups using SimpleCache locally then flipping the feature flag on; upgrades where the GAQ config block was dropped during config refactoring.","solutions":["Set GLOBAL_ASYNC_QUERIES_CACHE_BACKEND = {\"CACHE_TYPE\": \"RedisCache\", \"CACHE_URL\": \"redis://...\"} in superset_config.py (or RedisSentinelCache with sentinel config).","Keep GAQ on a dedicated Redis instance/database from the metadata cache, per the async queries docs.","Until you have Redis available, leave GLOBAL_ASYNC_QUERIES disabled (the default) so the backend factory is never invoked."],"exampleFix":"# before (superset_config.py)\nGLOBAL_ASYNC_QUERIES_JWT_SECRET = \"...\"\nFEATURE_FLAGS = {\"GLOBAL_ASYNC_QUERIES\": True}\n# GAQ cache backend unset -> UnsupportedCacheBackendError\n\n# after\nGLOBAL_ASYNC_QUERIES_CACHE_BACKEND = {\n    \"CACHE_TYPE\": \"RedisCache\",\n    \"CACHE_URL\": \"redis://my-redis:6379/2\",\n}","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"RedisCache\", \"RedisSentinelCache\"}\ngaq = config.get(\"GLOBAL_ASYNC_QUERIES_CACHE_BACKEND\", {})\nif gaq.get(\"CACHE_TYPE\") not in SUPPORTED:\n    raise SystemExit(\"Set GLOBAL_ASYNC_QUERIES_CACHE_BACKEND CACHE_TYPE to RedisCache or RedisSentinelCache\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run a config lint step in deployment pipelines that checks GAQ cache settings whenever the feature flag is on.","Keep a known-good superset_config.py template for GAQ under version control."],"tags":["configuration","async-queries","redis","cache","startup"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}