abderbejaoui commented on PR #38490: URL: https://github.com/apache/superset/pull/38490#issuecomment-4017866450
@villebro Thanks for the great catch! You're right, -1 means "bypass cache" for the Chart cache timeout field, as documented here: https://superset.apache.org/admin-docs/configuration/cache/#chart-cache-timeout I've updated the PR to handle this properly: Chart cache timeout (cache_timeout): now allows -1 (bypass cache), 0 (never expires), and positive values. Only values below -1 are rejected. Schema/Table cache timeout (metadata_cache_timeout): these remain non-negative only (≥ 0), since they have different semantics , their helper text states "If left unset, the cache never expires" with no -1 bypass behavior, and the backend treats negative values as unexpected for these fields. Validation is enforced on both frontend (input handler + min attribute) and backend (Marshmallow Range(min=-1) on all cache_timeout schema fields). Added tests for all cases. -- 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]
