cache: define variables for cache paths

As title suggests. Scripts may need to be aware of their cache paths without guessing. Necessary for bitcoin's (still) upcoming https://github.com/bitcoin/bitcoin/pull/4727