Sorry, that part somehow totally failed to register with me.
While there shouldn’t be too much to worry about with regards to SSD wear in the designated cache hierarchy, you can totally take it out of the picture by mounting it as a tmpfs with the noswap option; put this in your /etc/fstab:
volatile_cache /home/<user name>/.cache tmpfs noswap,uid=<user name>,gid=<user name>,mode=0750
(replace <user name> with your user name; can set (almost) anything you like instead of volatile_cache)
Then run systemctl daemon-reload to (re)generate the systemd mount units and follow up with sudo mount volatile_cache. Any new cache data will now be written to RAM and never touch the SSD. The downside is that after a reboot the cache will always be cold, but, if your usage pattern is like mine, i.e. long uptimes due to suspend/resume between (absolutely necessary) reboots (for things like kernel upgrades), that shouldn’t be too much of a problem. The upside, besides
speed, is that there will never be stale cached data taking up space long after it has outlived its usefulness.
To get an estimate of the RAM required for that kind of cache on tmpfs, run du -sh ~/.cache. But I guess that you needn’t worry too much about the space requirements, unless you have tools like ccache and do a lot of compiling.
While I don’t have such volatile cache directory — mainly because I do use ccache and couldn’t yet be bothered to handle it specially —, I do employ a version of it, specifically for Firefox’s cache; I have set this in about:config:
browser.cache.disk.parent_directory = /home/peter/tmp/firefox
/tmp should be a tmpfs by default nowadays. If you don’t want to risk an no-space-left situation on /tmp, one can just mount a user’s $TMPDIR as tmpfs, which is what I am actually running:
- mount tmpfs on user’s
$TMPDIR by an entry in /etc/fstab:peter_tmp /home/peter/tmp tmpfs noswap,uid=peter,gid=peter,mode=0750
(don’t forget to create the directory as the user: mkdir ~/tmp, otherwise the mount will fail)
- put
export TMPDIR="$HOME"/tmp && mkdir -p "$TMPDIR" in ~/.profile, or, better yet, put it in an environment.d drop-in, to make it available to the whole user login session, not just shells:echo 'TMPDIR="$HOME"/tmp' > ~/.config/environment.d/99-tmpdir.conf
Since Firefox seems to be the heaviest user of the cache, at least in my case (ignoring ccache), that should save the most write churn on the SSD. But I am not too worried about the latter, TBH, because modern SSD’s should be able to handle lots of drive writes; it’s more about speed for me — nothing beats RAM at access latency. 
(takes me about a week to fill Firefox’s cache to the default max of 1 GiB; current uptime: 14 days; plus, Firefox’s cache is smart and monitors available space, so the maximum is adjusted accordingly — default size cap of tmpfs is 50% of RAM total)
The above setup also allows to set XDG_CACHE_HOME="$TMPDIR"/cache; one can do so selectively by only setting it in the environment of specific applications.