How to Set Chrome Cache Location

Google Chrome has no user settings for cache location or size. Many people have been asking for this feature since version 1.0, but Google has not seen fit to provide it. I guess they still consider Chrome a beta at version 3.something.

People have figured out some hacks to do this. You still cannot set cache size, but you can set cache location. First, a caveat. Chrome stores the whole profile in the same place as the cache. So if you're moving the cache, be aware that you are also moving bookmarks, cookies, etc. Don't throw this stuff into some place too disposable.

Here's how to do it.

A not so good way to do it

Change the command used to start Chrome. The normal way to start Chrome is to use the command "chrome.exe" (which is done through the shortcut icon you click on to start it). You will need to modify this command, or better yet, make a new shortcut. The easy way to do it is right click your desktop, and from the context menu, pick "new shortcut". Then enter the command in the shortcut, like so:

C:\path-to-chrome-executable\chrome.exe --user-data-dir=c:\some-directory-here

make sure to replace path-to-chrome-executable with the proper path where Chrome is installed on your system, and some-directory-here to the place where you want the cache to go.

Now, whenever you start Chrome with this shortcut, your User Profile, including your cache files, will be stored at the new location.

The downside is that if Chrome is started in any other way than through this shortcut (for example, if Chrome is your default browser, and any other application automatically starts Chrome when it needs a browser), then files for that session will still go to the old location. This makes this method pretty much useless.

A better way to do it

The better way is to simply move the cache/profile directory to whatever drive you want it on, then in the original location just put a symbolic link pointing to the new location. This way, Chrome thinks it's storing files in the usual location, but that's actually just a symbolic link to another directory in a completely different location. No other hacks are needed, and the process always works, no matter how Chrome is started.

If you use Windows Vista or Windows 7 or any other operating system which does symbolic links, you can just do it directly. If you're using XP or some older operating system, you'll need to install a little utility from Microsoft called Junction, which you can download here. The instructions on how to create a symbolic link are right there on the download page.

If you're using Vista or Windows 7, the procedure is this.

1. Shut down Chrome. Then open Task Manager and check the processes and make sure the Chrome process is not running. Just closing Chrome doesn't always shut down the Chrome process, and if it's running, it will lock certain files that you need to move in the next step.

2. Create a directory at some suitable location where you want the cache to go, for example D:\Chrome Cache and Profile

3. Navigate to where Chrome is installed, and move the entire "User Data" directory into this new directory you created in the previous step. The User Data directory is usually found at C:\Users\{username}\AppData\Local\Google\Chrome\User Data. Just move the whole User Data directory to the new location. So now in the new location you'll have a User Data directory, like so "D:\Chrome Cache and Profile\User Data". And the User Data directory will be gone from the original location, because you moved it.

4. Next, open an elevated command prompt (right click the command prompt icon and choose "Run as Administrator"). In the command window, type:

mklink /J "C:\Users\{username}\AppData\Local\Google\Chrome\User Data" "D:\Chrome Cache and Profile\User Data"

Make sure to replace the {username} with your own user account name. Don't leave out the quotes, they are necessary.

That's it. Next time you start Chrome, it will store all files related to your profile (including cache) at the new location.