This message was deleted.
# community-support
s
This message was deleted.
v
Yes, this API should make the task cacheable. It is just that 99% of the
Sync
tasks are not worth caching unless you do very heavy calculation during the copying for example to calculate renaming or replacements, and
Exec
tasks most often have unknown side-effects that must not be skipped. Thus these tasks are non-cacheable by default, with you having the option to make them cacheable if you know what you do. 🙂
a
thanks
the problem is less that the Sync tasks are heavy, but more that if they're not cached then that has knock-on effects on other tasks
v
If the calculation is not heavy, what do you win then?
It will download an archive from the remote cache if available and put it to the local cache. Take it from the local cache and extract it to the destination. Just copying over the files is usually faster.
a
that results in the subproject output being out-of-date, and then the subprojects that depend on that subproject are out-of-date, and then the whole project is out-of-date
v
Then you should not cache that task
If downstream tasks are up to date because you cache that task, it means the task is producing different output and if it is producing different output, it should not have been cached.
If it should produce the same output, that should be fixed. And if it produces the same output, downstream tasks should see that and not be out of date.
The downstream tasks do not know whether that task was out-of-date, up-to-date or from-cache, it just looks at its own inputs and outputs.