My machine has lots of memory, so I moved ~/.cache/google-chrome
into /tmp
, which is a tmpfs RAM disk.
This makes the browser run faster and reduces SSD usage.
When I reboot, it all goes away, but it gets recreated again.
All is fine.
In theory, I could move all of ~/.cache
there too.
But in practice, how likely is it that some packages (ab)use ~/.cache
for something other than temporary reproducible data?
UPDATE:
I decided to try it out and did this:
$ mv ~/.cache ~/.cache.old
$ ln -s /tmp/home/ray/.cache ~/.
and then added this to my ~/.profile
:
mkdir -p /tmp/home/ray/.cache
and so far everything is working okay across reboots. Removing .cache.old will free up about 2G of mostly ancient files.
If I ever do run into any packages that misuse .cache, I can teach .profile
to add a symlink back to a real directory for that specific case.
0 Answers