Cache Relocator folder coverage for browsers
5 posts · Closed
I am redirecting a lot of temporary and cache folders from browsers. I am also redirecting Internet Explorer, Java, and several others. From what I am seeing, Cache Relocator redirects only one folder for each browser. But browsers (especially those based on Chromium) have several folders where they keep cache files.
What is your opinion?
I am redirecting these folders:
%LOCALAPPDATA%\Microsoft\Windows\ActionCenterCache %LOCALAPPDATA%\Microsoft\Windows\AppCache %LOCALAPPDATA%\Microsoft\Windows\Caches %LOCALAPPDATA%\Microsoft\Windows\INetCache %LOCALAPPDATA%\Microsoft\Windows\PRICache %LOCALAPPDATA%\Microsoft\Windows\WebCache %LOCALAPPDATA%\Mozilla\Firefox\Profiles %LOCALAPPDATA%\Moonchild Productions\Pale Moon\Profiles %LOCALAPPDATA%\Google\Chrome\User Data\Default\Cache %LOCALAPPDATA%\Google\Chrome\User Data\Default\Code Cache %LOCALAPPDATA%\Google\Chrome\User Data\Default\GPUCache %LOCALAPPDATA%\Google\Chrome\User Data\Default\Service Worker\CacheStorage %LOCALAPPDATA%\Google\Chrome\User Data\Default\Service Worker\CacheStorage %LOCALAPPDATA%\Google\Chrome\User Data\ShaderCache %LOCALAPPDATA%\Opera Software\Opera Stable %APPDATA%\Opera Software\Opera Stable\Code Cache %APPDATA%\Opera Software\Opera Stable\GPUCache %APPDATA%\Opera Software\Opera Stable\Service Worker\CacheStorage %APPDATA%\Opera Software\Opera Stable\Service Worker\ScriptCache %APPDATA%\Opera Software\Opera Stable\ShaderCache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Cache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Code Cache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\GPUCache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Media Cache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Service Worker\CacheStorage %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Service Worker\ScriptCache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Guest Profile\Cache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Guest Profile\Code Cache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Guest Profile\GPUCache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\ShaderCache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\System Profile\Cachex %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\System Profile\Code Cache %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Tor Profile
You are right, the Cache Relocator utility only moves the page cache that contains HTML, CSS, images and scripts from web-pages.
Like you pointed out, there are other cache folders, e.g. GPUCache and Code Cache, but the amount of data in those seems small, and it is unclear whether anything could break if they are relocated.
It's of course OK to try moving other folders, if you are an experienced user and you know what you are doing. You could simply create symbolic links and redirect them to a RAM disk. If anything breaks, simply delete the symbolic links and it will be back in the folders. Once you ensure everything works properly, you can create a batch file to apply these settings on a new computer.
Hi Florin,
I am just trying out RAM DISK in general and your question made total sense to me. I saw Andrew's response, but I am wondering where this went for you and if you found a reliable and convenient way to deal with redirecting and managing the many other possible cache folders successfully? And if yes, how.
I have been imaging it would be beneficial to redirect temp stores and caches from browser extensions, an example being suspended tab session data, and so I am reaching out to you given you have probably already explored this ground and figured out either a solution or punted on the idea.
Thanks in advance.
-G
Hi GFx,
I found that some of the Chrome cache is no longer in the Ramdisk. I wanted to write something about that in the forum, but I saw that others found that way ahead of me.
I saw your post only now. Sorry...
Here is my script. I use it to do some work and to list some manual tasks I have done when setting up my computer, to make my life easier for my next computer.
:: APPDATA =%USERPROFILE%\AppData\Roaming :: LOCALAPPDATA=%USERPROFILE%\AppData\Local @echo OFF CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Cache" "B:\Cache\Brave\Default\Cache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Code Cache" "B:\Cache\Brave\Default\Code Cache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\GPUCache" "B:\Cache\Brave\Default\GPUCache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Service Worker" "B:\Cache\Brave\Default\Service Worker" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Session Storage" "B:\Cache\Brave\Default\Session Storage" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\session_profiles\Tor Profile" "B:\Cache\Brave\Tor Profile" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Guest Profile\Cache" "B:\Cache\Brave\Guest Profile\Cache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Guest Profile\Code Cache" "B:\Cache\Brave\Guest Profile\Code Cache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Guest Profile\GPUCache" "B:\Cache\Brave\Guest Profile\GPUCache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\ShaderCache" "B:\Cache\Brave\ShaderCache" CALL :CreateSymLink "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\System Profile\Cachex" "B:\Cache\Brave\System Profile\Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Cache" "B:\Cache\Chrome\Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Code Cache" "B:\Cache\Chrome\Code Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Google\Chrome\User Data\Default\GPUCache" "B:\Cache\Chrome\GPUCache" CALL :CreateSymLink "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Service Worker" "B:\Cache\Chrome\Service Worker" CALL :CreateSymLink "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Session Storage" "B:\Cache\Chrome\Session Storage" CALL :CreateSymLink "%LOCALAPPDATA%\Google\Chrome\User Data\ShaderCache" "B:\Cache\Chrome\ShaderCache" CALL :CreateSymLink "%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Cache" "B:\Cache\Edge\Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Code Cache" "B:\Cache\Edge\Code Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\GPUCache" "B:\Cache\Edge\GPUCache" CALL :CreateSymLink "%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Service Worker" "B:\Cache\Edge\Service Worker" CALL :CreateSymLink "%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Session Storage" "B:\Cache\Edge\Session Storage" CALL :CreateSymLink "%LOCALAPPDATA%\Microsoft\Edge\User Data\ShaderCache" "B:\Cache\Edge\ShaderCache" CALL :CreateSymLink "%LOCALAPPDATA%\Mozilla\Firefox\Profiles" "B:\Cache\Firefox" CALL :CreateSymLink "%LOCALAPPDATA%\Opera Software\Opera Stable" "B:\Cache\Opera\Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Opera Software\Opera Stable\Code Cache" "B:\Cache\Opera\Code Cache" CALL :CreateSymLink "%LOCALAPPDATA%\Opera Software\Opera Stable\GPUCache" "B:\Cache\Opera\GPUCache" CALL :CreateSymLink "%LOCALAPPDATA%\Opera Software\Opera Stable\Service Worker" "B:\Cache\Opera\Service Worker" CALL :CreateSymLink "%LOCALAPPDATA%\Opera Software\Opera Stable\Session Storage" "B:\Cache\Opera\Session Storage" CALL :CreateSymLink "%LOCALAPPDATA%\Opera Software\Opera Stable\ShaderCache" "B:\Cache\Opera\ShaderCache" ::To move the Java file in the Ramdrive, you have to manually do the following steps: ::1. Go here: %SYSTEMDRIVE%\Users\%USERNAME%\AppData\LocalLow\Sun\Java\Deployment\ ::2. Edit the document in Notepad: deployment.properties ::3. Add or edit the field: deployment.user.cachedir=B\:\\Cache\\Java ::4. Go to Java properties and adjust the amount of disk space to at most half of the ram drive. MD "B:\Cache\Java" @PAUSE EXIT /B :CreateSymLink :: Remove both folders (the original and the destination) RD /S /Q %1 RD /S /Q %2 :: Creates the folder and the link MD %2 ECHO MKLINK /D %1 %2 MKLINK /D %1 %2 GOTO :EOF ::SDG :: Those are the folders to be created in the RAMDisk TEMP Cache\IE\ActionCenterCache Cache\IE\AppCache Cache\IE\INetCache Cache\IE\PRICache Cache\IE\WebCache Cache\Firefox Cache\Chrome\Cache Cache\Chrome\Code Cache Cache\Chrome\GPUCache Cache\Chrome\Service Worker Cache\Chrome\Session Storage Cache\Chrome\ShaderCache Cache\Opera\Cache Cache\Opera\Code Cache Cache\Opera\GPUCache Cache\Opera\Service Worker Cache\Opera\Session Storage Cache\Opera\ShaderCache Cache\Brave\Default\Cache Cache\Brave\Default\Code Cache Cache\Brave\Default\GPUCache Cache\Brave\Default\Service Worker Cache\Brave\Default\Session Storage Cache\Brave\Guest Profile\Cache Cache\Brave\Guest Profile\Code Cache Cache\Brave\Guest Profile\GPUCache Cache\Brave\ShaderCache Cache\Brave\System Profile\Cache Cache\Brave\Tor Profile Cache\Edge\Cache Cache\Edge\Code Cache Cache\Edge\GPUCache Cache\Edge\Service Worker Cache\Edge\Session Storage Cache\Edge\ShaderCache
Hello...
I'm not a total newbie but still much to learn. Would appreciate if someone can tell me how to adapt the above script and run it for my system. I have Windows 11. Browsers are Brave, Edge, Firefox and Pale Moon. My RAM disk is drive V: and Cacherelocator will successfully move the Internet cache. I would like to move the other caches as well. I do know about .bat files but not how to run scripts.