The .cache directory is full of volatile, non-essential files.
I would like to move it to a more appropriate partition, i.e. faster and not backed up.
I believe that ~/.pam_environment file is appropriate for this but am not sure if is the best or if it is documented properly or working properly.
If you don't care about keeping the stuff there across reboots, you can use tmpfs to store the cache.
Set something like the following in
/etc/fstab
:Now, your .cache will be stored in memory instead of on disk, though if you have insufficient memory it could end up being swapped out.
A more traditional approach would be to move the directory to wherever you like and symlink it as appropriate: