mikebridge commented on code in PR #45288:
URL: https://github.com/apache/superset/pull/45288#discussion_r4287681655


##########
docs/admin_docs/configuration/cache.mdx:
##########
@@ -112,6 +112,19 @@ 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`.
 
+The datasource column-values and compatibility endpoints skip cache reads and 
writes when
+their effective timeout is `-1`. They use the datasource timeout (for SQL 
datasets, falling
+back to the database timeout), then the **top-level** `CACHE_DEFAULT_TIMEOUT` 
when that value
+is unset or zero. They do not use `DATA_CACHE_CONFIG["CACHE_DEFAULT_TIMEOUT"]` 
for this
+fallback, so setting only that nested default to `-1` does not disable these 
endpoints.

Review Comment:
   I get a different result on the current head, 1b31f258fd. 
`QueryContext.get_cache_timeout()` can return `None`, but 
`QueryContextProcessor.get_cache_timeout()` then resolves 
`DATA_CACHE_CONFIG["CACHE_DEFAULT_TIMEOUT"]` followed by the top-level default 
before `get_df_payload_result` chooses `force_query`; the resolved timeout also 
reaches the write helper. See [the processor 
resolver](https://github.com/apache/superset/blob/1b31f258fddcf58d6fda615a94c4103343a576d4/superset/common/query_context_processor.py#L787-L835).
   
   A local probe of those methods with a mock cache backend gives 
`force_query=True` and no writes for either nested `-1` or top-level `-1` with 
no nested override. A positive nested timeout takes precedence over top-level 
`-1` and permits both operations. I did not rerun this against Redis. I have 
retained the fallback distinction in the docs/body and recorded a follow-up 
investigation proposal to reconcile the reported deployment or entrypoint; I 
cannot confirm the chart-data read-side bug on this head.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to