But can you? Did you really close all the apps using ~/.cache? What if some app is just doing some cleanup operation, moves a bunch of stuff to cache, and the files are missing now? Did you just delete android studio cache in the middle of a compile?
You can also make a script like your .config, but it's called "clear_cache.sh", where you hardcore a few paths you usually clean manually.