Caching is a technique used by many programs to improve their performance, especially for applications that run over the Internet, such as streaming programs or web browsers. This technique consists of saving all or part of the information being processed in a directory so that, if we return to it, instead of having to download it again from the Internet it is loaded directly from the computer. And although it may seem like a good feature in general, if we don't control the cache of the programs it may cause us some headaches.
That's why, sometimes, we may want to change where the cache is stored.
Although the cache means that the web pages we visit frequently can load faster, if we have a small hard disk (for example, an SSD) this cache may be taking up a lot of this disk space. Also, if you have a conventional hard disk, rather than an SSD, slower access times can make cache usage counterproductive, making it better to download data from the Internet again rather than loading data already stored on the hard disk.
Programs usually store their caches within their own directories. And the developers' idea is that users should not change these settings. Luckily, there are little tricks that allow us to change, at least in browsers, the directories where the cache is saved and managed.
Move Google Chrome cache
Among the many configuration options that Google Chrome has, we can't find a section that allows us to change the path where the browser cache is saved. To change it, what we have to do is manually modify the browser's shortcut so that, when we open it, the browser is told that the cache is in another path.
To do this, locate the Google Chrome shortcut, right-click on it, and open the Properties window. Within the properties of the shortcut, what we have to do is go to the section of "Destination" and add the following:
--ser-data-dir=directorio (changing "directory" to the path we want to use)
When we open the browser again, the cache will be saved in the new directory we have specified. Whenever we open the browser for this shortcut, the new cache directory will be used. But if we open it from another shortcut, the default cache directory will be used again. To use the default cache directory again, we simply need to clear this parameter and run Chrome again.
Changing the Firefox cache
Although Firefox doesn't make it very intuitive either, it allows you to change the cache path from the advanced settings of the browser, although manually. To do so, what we have to do is enter the browser's configuration by typing "about:config" in the address bar, and look for the following string:
In case it does not exist we can create it manually. We will click with the right button of the mouse and we will choose "New > Chain", giving it that name.
Once the new string is created we must edit it to add the directory we want to be configured as browser cache.
Once done, we restart the browser and when it is opened again, the new directory will be set as the default path for saving the cache. If we want Firefox to use the default cache directory again, we simply have to look for this option again and delete it from the trash icon.
Change the Edge cache
Microsoft Edge, the Windows 10 browser, is based on Chromium. This means that, for better or worse, it adopts the same features as Google's browser. Like its rival, Edge doesn't allow us to change from the configuration the directory where we want the cache of it to be saved. But the process for changing it is identical to Chrome's.
So, what we have to do is edit the shortcut and add the same parameter, at the end of the destination box, that we have added for Chrome. It's recommended that each browser has a separate directory (even if it's a sub-folder), because if they all use the same
As in Chrome, we must open the browser from this shortcut to use the new cache. If we open it from another one, the default directory will be used again. To undo the changes we must simply delete this parameter from the URL.
Change the Opera cache directory
In the case of using this alternative web browser (or other Opera-based browsers), we can also customize the directory where we want the browser cache to be stored. The process is similar to Chrome and Edge, that is, we have to modify the shortcut to specify the directory where we want the cache to be saved. But instead of adding the parameter above we need to add the following:
When we run the browser from this shortcut, it will use the new path we just specified by default to save the cache and temporary files. If we want to use the default cache again, we'll simply remove the parameter we've just added and reopen it. Or open it from a different shortcut.