Here’s how to exclude files when using rsync.

It’ll just check “cache/” against the list.

So you’ll need to put “cache” into the list, not the full path.

How to Exclude Files from Rsync

It’s pretty simple beyond that.

The syntax is very similar:

The same relative path should apply here as above.