You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/08/27 15:51:39 UTC

(superset) 01/01: docs(cache): document NATIVE_FILTER_OPTIONS_CACHE_TIMEOUT alongside chart cache timeout

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch fix/from-pr-38910-needs-docs-fix-native-filters-use-filter
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 930fad406e47ebae57857faada4cf9d0e4f7ee25
Author: rusackas <ev...@rusackas.com>
AuthorDate: Thu Aug 27 08:51:21 2026 -0700

    docs(cache): document NATIVE_FILTER_OPTIONS_CACHE_TIMEOUT alongside chart cache timeout
    
    The general Flask-Caching backend section didn't mention the dedicated
    timeout knob for native filter option queries introduced in #38910;
    document it next to DATA_CACHE_CONFIG in the Chart Cache Timeout section.
    
    Co-Authored-By: Claude <no...@anthropic.com>
---
 docs/admin_docs/configuration/cache.mdx | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/docs/admin_docs/configuration/cache.mdx b/docs/admin_docs/configuration/cache.mdx
index efb2587646e..4abd4a4e3ec 100644
--- a/docs/admin_docs/configuration/cache.mdx
+++ b/docs/admin_docs/configuration/cache.mdx
@@ -76,6 +76,27 @@ value defined in `DATA_CACHE_CONFIG`.
 Note, that by setting the cache timeout to `-1`, caching for charting data can be disabled, either
 per chart, dataset or database, or by default if set in `DATA_CACHE_CONFIG`.
 
+Native filter option queries (the dropdown values for native filters) go through this same
+chart-data cache, but their freshness needs often differ from regular chart queries, especially for
+datasets whose visible values change frequently, including RLS-constrained datasets. Set
+`NATIVE_FILTER_OPTIONS_CACHE_TIMEOUT` in `superset_config.py` to give these queries a dedicated
+timeout, checked before the chart/dataset/database chain and the `DATA_CACHE_CONFIG` default above:
+
+```python
+NATIVE_FILTER_OPTIONS_CACHE_TIMEOUT = 60  # seconds
+```
+
+- `None` (default): native filter option queries fall through to the normal
+  chart/dataset/database/`DATA_CACHE_CONFIG` resolution chain.
+- `-1`: disables caching for native filter option queries entirely.
+- `0`: passed directly to the cache backend; behavior is backend-specific, so use `-1` if the intent
+  is to disable caching.
+- A positive integer: cache native filter option queries for that many seconds.
+
+This setting only applies to requests detected as native filter option queries. It takes precedence
+over the per-chart/dataset/database timeouts, but not over an explicit per-request
+`custom_cache_timeout` override (e.g. "Force refresh").
+
 ## Limiting Cached Result Size
 
 Very large chart or SQL query results can flood the cache backend (Redis/Memcached), evicting many