To avoid redoing work when executing Snakemake workflows multiple times, you can enable task caching. Rules whose outputs have been cached will not execute, saving time and resources.To enable caching, re-register your workflow with the --cache-tasks flag. For example
Cached outputs persist across workflow versions, so if a downstream rule has an error, and you register a new version, the upstream rules will be cached. Caches are invalidated when a rule’s properties change. If a rule references a script, the cache will also be invalidated if the script changes.