Syméon del Marmol
12/16/2025, 8:22 AMMarvin
12/16/2025, 8:22 AMMarvin
12/16/2025, 8:24 AMPREFECT_TASKS_DEFAULT_NO_CACHE=true.
Details:
- PREFECT_TASKS_DEFAULT_NO_CACHE (bool) sets the default cache policy on all tasks to NO_CACHE (i.e., “NONE”). Tasks can still override this by explicitly setting a cache_policy.
- If you want to hard-disable caching everywhere regardless of per-task settings, use PREFECT_TASKS_DISABLE_CACHING=true.
Examples:
# Prefer this to make the default policy NO_CACHE
export PREFECT_TASKS_DEFAULT_NO_CACHE=true
# Or, strictly disable caching everywhere
export PREFECT_TASKS_DISABLE_CACHING=true
Docs: Settings reference (see Tasks settings: tasks.default_no_cache and tasks.disable_caching)
Note: In Prefect 3.x, the default cache policy is a composite that includes inputs, task source, and run id; setting the env var above changes that default to no cache.