sadpandajoe commented on code in PR #43523:
URL: https://github.com/apache/superset/pull/43523#discussion_r4022440479


##########
docs/admin_docs/configuration/cache.mdx:
##########
@@ -326,6 +326,32 @@ Then on configuration:
 WEBDRIVER_AUTH_FUNC = auth_driver
 ```
 
+### Refreshing successfully-rendered thumbnails
+
+Once a thumbnail renders successfully it is cached with no expiry, so on cache 
backends without
+TTL eviction (for example S3) a stale — or valid-but-blank — capture can be 
served indefinitely to
+callers that do not pass `force=true`. `THUMBNAIL_UPDATED_CACHE_TTL` bounds 
how long a
+successfully-rendered thumbnail is served before it is recomputed:
+
+```python
+from datetime import timedelta
+
+# Recompute a successfully-rendered thumbnail once it is older than 7 days 
(the default,
+# matching THUMBNAIL_CACHE_CONFIG's CACHE_DEFAULT_TIMEOUT).
+THUMBNAIL_UPDATED_CACHE_TTL = int(timedelta(days=7).total_seconds())
+```
+
+- **Opt out:** set `THUMBNAIL_UPDATED_CACHE_TTL = 0` (or `None`) to keep 
serving a rendered

Review Comment:
   Setting this to `0` doesn't keep thumbnails indefinitely on TTL-capable 
backends: cache writes still use `THUMBNAIL_CACHE_CONFIG.CACHE_DEFAULT_TIMEOUT` 
(seven days by default), so this only disables the new age check and restores 
backend-defined retention. Could the opt-out text say that instead of promising 
serve-forever behavior?



-- 
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