Why move the Chrome Cache Directory?
My personal reason for moving the Chrome cache directory is because my main hard drive is a rather dinky 80GB Solid State Drive (SSD). Having tens or hundreds of megabytes being written all the time to the SSD is something I wanted to avoid. Not only does that take up valuable space but makes for a lot of write operations on the drive.
For the curious, there might be a slight performance lag by putting the cache on a regular mechanical hard drive (a spinner), but for the life of me I don’t notice it one little bit.
Your reasons for wanting to move the cache directory may vary wildly. A good reason to keep it off your main Windows drive involves backups. You are making regular backups, aren’t you? The point is, there is no point in backing up these cache files. They take up room and make your backups take that much longer. Maybe you’d like to move the cache directory to a RAM drive for some lightening fast response. Another advantage might be to have those files deleted when you shut your computer off.
I’m sure you can come up with many reasons not mentioned here.
That method involved adding ‘switches’ or command-line parameters to the Chrome shortcut settings. That worked well for me at the time, but something recently happened that is the impetus for this update.
I recently re-installed Windows on my computer. It is something I generally do roughly once a year or whenever I feel like the computer just isn’t running as good as it should.
This time, for whatever reason that I have not been able to fathom, that method is simply not working for me. Maybe it has something to do with a new Chrome version? I really have no idea what happened.
Here is another way to change the default location of the Chrome cache directory. It takes a little more effort but I know it works for sure. Using this method Chrome started behaving right away. No re-boot, no muss, no fuss.
The first thing you want to do is make sure no instances of Google Chrome are running in the background. Here’s how to do that:
Open the Task Manager
As with all versions of Windows there are several different ways to achieve the same result- no exception here.
- Right-click on the Task Bar and choose Task Manager, or
- Hold the <CTRL>+<SHIFT> keys and tap the <ESC> key
Once you have Task Manager open click on the Processes tab. In this image on my computer you will see that I have 6, count them, 6 instances of Chrome running. This does not mean that I have opened Chrome 6 times; it is merely the way Chrome runs itself.
If you have closed your Chrome browser then you don’t want to see any instances of Chrome listed here. If you do, click on each one and hit the End Process button in the bottom-right corner. Continue this until there are no instances of Chrome in the list. I’ll wait…
This is where we perform the magic. It may seem a daunting procedure for those of you who are not familiar with the Command Box and/or typing cryptic-looking command lines. Never fear! It really isn’t as complicated as it may look at first glance.
First things first
The default Chrome cache location is on your Windows drive. This is how the typical path looks:
Open your favorite file manager and follow this path by starting with the “C:\” drive, then click on Users, then Your User Name (mine is Richard; it will be the name of the account you chose when you installed Windows). Keep expanding directories. Eventually you should find yourself at the Chrome Cache Directory. It may look similar to this:
Your listing will most probably look different. It is unlikely that we have both installed the same programs on our respective machines. The reason my Cache directory has that little shortcut arrow on it is because of what I’m about to tell you. You’ll soon have that cute little arrow, too.
- Right-click and rename the Cache Directory to something that makes sense to you (Cache.old, for instance?)
- Open a Command Box with Administrator privileges: Hit the Windows Logo Key+ R
- Type cmd and hit <RETURN>; this should open the Command Box
Note: You must have Admin Privileges for this to work. Look in the Title Bar and you will see the word “Administrator” if you do. Like in this image:
For the purposes of this discussion I will presume you want to create your new cache directory at E:\ cache. You will have to replace that information in the following command line with the actual destination that applies to you.
Basically what we are going to do is tell Windows to create a link at a <source> location and have it point to a <destination> location. It looks like this: mklink /d “<source” “<destination”
For our purposes the source and destination will look like this:
- Source: C:\Users\<user name>\AppData\Local\Google\Chrome\User Data\Default\Cache\
- Destination: E:\cache
Remember, you will have to change the paths to apply to your specific computer.
That’s pretty easy to understand. Let’s get into it.
At the prompt you will need to type the following:
mklink /d “C:\Users\<user name>\AppData\Local\Google\Chrome\User Data\Default\Cache\” “E:\cache”
The Devil is in the Details
There are a few things to which you must pay close attention:
- Spaces – the computer considers spaces the same as it does visible characters. Do not ignore them. The computer doesn’t
- Backslash – you will notice a backslash after the Source part of the command line, but not after the Destination part
- Quotes – these separate the two parts of the command; that is how the computer knows where the Source and Destination begin and end
All of the above are important. One seemingly insignificant error and it won’t work. Period. If you are successful, you won’t get an error message. If you do get an error, just enter it all again and pay closer attention.
Once you have successfully completed the above task you should have a new directory in the old location on your C:\ drive. This time, though, it will have that pretty shortcut arrow that we have been working so hard to create.
This indicates that this directory is merely a pointer to the directory you created on another drive. It’s a shortcut, or link, just like the shortcuts on your desktop are not the programs themselves. They’re just pointers to those programs.
To test that everything is working as you expect all you have to do is open up your new Chrome Cache Directory in your favorite file manager. While you keep an eye on that, fire up Google chrome. If all is well you start seeing your new cache filling up with temporary cache files generated by Chrome.
Success and Clean Up
When you are satisfied that all is well, you can delete that old cache directory from your system drive. Remember the one you renamed earlier (like cache.old)?
If you have gotten through this long-winded explanation, then I commend you and your determination. I also congratulate you for taking control of your Windows computer and making your file system a better-behaved beast.
If you have any questions specific to this article, hurdles you can’t seem to overcome, or suggestions to help others please don’t hesitate to leave a comment below.
Enjoy this article?