rsync: exclude file instead of a long command
A repeated backup is easier to maintain with a separate exclude file.
printf "cache/\n*.tmp\n" > rsync.exclude
rsync -a --exclude-from=rsync.exclude /srv/app/ /backup/app/
Verify the result
After dry-run, confirm only expected paths were excluded.