How to force Chrome disk cache size and directory location?

5

1

There is a command-line switch for Chrome for setting Disk cache size and location.
Mine looks like this: --disk-cache-dir="C:\0\cache" --disk-cache-size=1073741824

If you want to have these settings all-the-time, you need to modify ALL your icons, and your registry.

I have modified all my icons. And my registry.
However, my registry reverts all the time. How can I protect my registry from this?

The registry modification looks like this (exported it from my registry; .reg file):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ChromeHTML\shell\open]

[HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command] @="\"C:\Users\username\AppData\Local\Google\Chrome\Application\chrome.exe\" --disk-cache-dir=\"C:\0\cache\" --disk-cache-size=1073741824 -- \"%1\""

Apache

Posted 2011-07-21T11:48:59.083

Reputation: 14 755

Answers

4

You should not change HKEY_CLASSES_ROOT (HKCR). This is simply a merged view from HKEY_CURRENT_USER\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes.

  • If you wish to make a change that affects all users that can connect to the machine, use:

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command

  • If you wish to make changes that affect only the current user, use:

    HKEY_CURRENT_USER\Software\Classes\ChromeHTML\shell\open\command


Note: Depending on how Chrome was installed, you may not see one of these; i.e. if it was installed just for the current user, "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML" will be missing). But You can move and copy from one key to the other if you want.

For more information: See Windows registry Information

A Dwarf

Posted 2011-07-21T11:48:59.083

Reputation: 17 756

Well, it's got the same value in the LOCAL_MACHINE, but the change gets reverted for some reason ... somehow ... I don't know. :/ – Apache – 2011-07-21T12:18:32.813

@Shiki Another issue I'm noting is the lack of double backslashes inside the paths – A Dwarf – 2011-07-21T12:20:31.347

Nevermind that last comment. It's an export – A Dwarf – 2011-07-21T12:23:18.020

@Shiki. Being that the case, here comes my stupid question. Have you rebooted after changing the value? – A Dwarf – 2011-07-21T12:24:05.510

1No point in rebooting. Not at all. Computers are not magic, and "reboot" is no magic spell. – MSalters – 2011-07-21T12:32:16.117