VRChat
123 évaluations
Clearing / Moving The Cache
De iiyko
VRChat feeling laggy? I know how you feel. Entering a room with 4 people and getting frame drop is not the most ideal thing for anybody playing VRChat. Here's something that might save you some time and frustration.

Please do note, this is not going to work for everybody, as cache size and location may not be the issue you are facing
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
Introduction
There are going to be 4 cleaning methods when it comes to the cache for VRChat

In case you're curious as to what the cache actually is, it's a folder set in your AppData that downloads all the maps you visit, along with some other cookies and what not.

NEW Method 1 is using VRChat's newly (as of September 2020) implemented config.json option to move your cache to a different directory.

Method 2 is simply clearing the cache and starting anew. This is the simplest method, and assuming you don't want 30gb of downloaded maps that you no longer visit on your C: drive, the best method as well.

Method 3 is redirecting the cache so that your poor C: drive is not suffering from storage abuse. This comes in handy for SSD users who might be wondering why their drive is suddenly so full.

Method 4 is similar to Method 3, in that you are redirecting your Cache buy instead of using a Sym Link you are using a Directory Junction which is joining folders together and mapping them into a directory.

--------------------------------------------------------------------------------------------------------

Note: A Symbolic Link is not the same thing as a Shortcut.

A "Symbolic Link" can actually act like a substitute for a directory or file in a functional way, and is commonly used in Unix/Linux environments. Although there is apparently support for this in Windows, I haven't seen any actual use of it yet.

A "Shortcut" is just a regular file that has a reference to the destination file or directory along with some other things like the icon to be displayed. Unlike a Symbolic Link, you cannot "cd ./shortcut-name" in DOS (in Unix/Linux you can "cd ./symlink-name" and it will work just like a real sub-directory).

Also, in most Windows applications, when you click on a Shortcut in any File->Open GUI dialogue, your filename field gets populated with that shortcut's filename as well as it acting like a sub-directory, while in Unix/Linux the GUI treats a Symbolic Link as a path (without modifying the filename field).

Information and explanation can be found here.[superuser.com]
NEW: Moving your cache via config file (06/04/2021)
YOU CAN NOW MOVE YOUR CACHE BY EDITING YOUR CONFIG FILE
https://docs.vrchat.com/docs/vrchat-202032p5


The following steps are required to do this:

1. Create a file called config.json in your main VRChat folder under
C:\Users\USERNAME\AppData\LocalLow\VRChat\VRChat



2. Open the config file via any text editing program you have and add the following:
{
"cache_directory" : "D:/VRChatCache/"
}



This way, your directory will be in the D:/VRChatCache folder in your D: driver instead of your C: drive.

If you need to remove your already created sym-link follow these steps:

To delete a symbolic link, treat it like any other directory or file. If you created a symbolic link, move to the root directory and use the rmdir command. If you created a symbolic link (<SYMLINK>) of a file, to delete a symbolic link use the del command.

Method 1 - Clearing The Cache
Here's how to clear your cache of unwanted and unused maps.
Disclaimer: You WILL Have To Reinstall The Maps When Rebooting VRChat

Note Before Following Steps: Make sure VRChat is closed entirely.



Still want to go through with manual cleaning? Well alrighty!

Step 1 - Click your windows start menu and type out %appdata%
> Since you're here, you'll notice C:\Users\User\AppData\Roaming
> Just navigate back to the AppData folder by clicking on the AppData




Step 2 - Now that you're in the AppData folder, look for a folder named LocalLow
> Open the LocalLow folder and search for the VRChat folder
> Open the VRChat folder




Step 3 - In the VRChat folder, you will find another folder called "vrchat"
> Delete this folder and relaunch VRChat



That's all there is to it! The cache is cleared up and you'll be able to spend another 150 hours on the game to download another 30gb!
Method 2 - MKLinking The Cache
This one is a bit more complicated, but I highly suggest it if you're running low on HDD/SSD space and just generally dont want to see these map files resaved on your C: drive.

Step 1 - Find the VRChat folder in your %appdata% folder just like Method 1
> Under the AppData folder, find LocalLow, and then VRChat




Step 2 - Move the main VRChat folder (the one in LocalLow) out of the C: drive, to whatever drive you'd like to store it from now on.

Step 3 - Open CMD by clicking the start menu and typing cmd



Step 4 - Type the following:

cd AppData
Press Enter, and then type:
cd LocalLow



Step 5 - Now that you've got that down, you need to link the folder to VRChat under the AppData.

Type the following: mklink /d C:\Users\YOURUSERNAME\AppData\LocalLow\VRChat D:\Games\VRChat

NOTE: REPLACE THE "YOURUSERNAME" WITH YOUR USERNAME, AND THE "D:" WITH THE DRIVE YOU MOVED THE VRCHAT CACHE TO.

After pressing enter, the files should be linked so that everything is saved into the new drive.

Side-Note: If you are having trouble because it is telling you any of the following below, follow the steps to fix it

"Cannot create a file when that file alread exists."
You must move or delete the VRChat folder from under AppData before creating the link. Make sure the folder was moved to the Drive of your choice and have it removed from the C: Drive.

"You do not have the permission to make these changes"
Any message that looks like this simply means you need to launch the CMD as an administrator. You can do this by right clicking CMD and click "launch as administrator.
Method 2 (Updated)
Due to recent updates in both Windows and VRChat, there are some issues when trying to MKLink the cache. Here is the updated way to MKLink your cache if you are having issues with the path when booting up CMD as an admin.

Disclaimer: Before going ahead and doing this method, I would like to mention that VRChat has added the option to clean your cache within the VRChat game now. I have updated Method 1 accordingly. This method is what I would recommend if you are using an SSD as your C: drive, since constantly deleting and rewriting files on an SSD is not the best idea.

Step 1 - Find the VRChat folder in your %appdata% folder just like Method 1
> Under the AppData folder, find LocalLow, and then VRChat






Step 2 - Move the main VRChat folder (the one in LocalLow) out of the C: drive, to whatever drive you'd like to store it from now on.

Step 3 - Open CMD as an admin by clicking the start menu and typing cmd (alternatively, windows button + r, type "cmd", and then press ctrl + shift + enter).






Step 4 - Now here is where the change occurs. When booting up CMD as an admin now, you will find that it shows up with a path already in place. This path being C:\WINDOWS\system32. In order to change this path to then get back to the proper spot as the original Method 2, you will have to type the following in:

cd C:\users\YOURUSERNAMEHERE\appdata\locallow

Step 5 - You are now where you should be per the steps followed in the original Method 2. All you have to do now is type the following:

mklink /d C:\Users\YOURUSERNAME\AppData\LocalLow\VRChat D:\Games\VRChat

NOTE: REPLACE THE "YOURUSERNAME" WITH YOUR USERNAME, AND THE "D:" WITH THE DRIVE YOU MOVED THE VRCHAT CACHE TO.

Once you type this in, you should see "symbolic link created for C:\users\USERNAMEHERE\appdata\locallow\vrchat <<===>> D:\Vrchat

This means you have successfully created the link and no longer have to fear VRChat caches killing your C: drive.
Method 3 (Directory Junction)
Recently, an update broke MKLinks for VRChat. However, there is an alternative (thank you Vurticaw for the comment)

What is a Directory Junction?
Directory junctions allow you to join folders together so you can map a directory to any local target directory. Imagine you had three folders, c:\folder1, c:\folder2 and c:\documents. Its possible to create a directory junction to c:\documents appears as a subdirectory of the other two folders resulting in c:\folder1\documents and c:\folder2\documents.

For this method, please follow the steps from Method 2 (Updated) up until you reach Step 4.
Method 2 (Updated)

Due to recent updates in both Windows and VRChat, there are some issues when trying to MKLink the cache. Here is the updated way to MKLink your cache if you are having issues with the path when booting up CMD as an admin.

Disclaimer: Before going ahead and doing this method, I would like to mention that VRChat has added the option to clean your cache within the VRChat game now. I have updated Method 1 accordingly. This method is what I would recommend if you are using an SSD as your C: drive, since constantly deleting and rewriting files on an SSD is not the best idea.

Step 1 - Find the VRChat folder in your %appdata% folder just like Method 1
> Under the AppData folder, find LocalLow, and then VRChat







Step 2 - Move the main VRChat folder (the one in LocalLow) out of the C: drive, to whatever drive you'd like to store it from now on.

Step 3 - Open CMD as an admin by clicking the start menu and typing cmd (alternatively, windows button + r, type "cmd", and then press ctrl + shift + enter).








Step 4 - Now here is where the change occurs. When booting up CMD as an admin now, you will find that it shows up with a path already in place. This path being C:\WINDOWS\system32. In order to change this path to then get back to the proper spot as the original Method 2, you will have to type the following in: cd C:\users\YOURUSERNAMEHERE\appdata\locallow

Step 5 - You are now where you should be per the steps followed in the original Method 2. All you have to do now is type the following:

Use the following:
mklink /J "C:\Users\<WindowsUserName>\AppData\LocalLow\VRChat" "D:\<LocationYouWant>\VRChat"

If successful you should see Junction created for
C:\Users\<WindowsUserName>\AppData\LocalLow\VRChat <<===>>
D:\<LocationYouWant>\VRChat

Change D:\ to which ever drive you're going to use aside from C:\
26 commentaires
Hellcat999 8 avr. à 2h04 
do these methods still work?
Frampt 🥦 15 oct. 2020 à 7h29 
ty :cozybethesda:
Kyuubi 12 sept. 2020 à 14h36 
Sorry for the late reply.
Thank you KoyoRed, i was able to delete the old symlink. VRC´s method doesn´t work at all for me, cause my VRChat doesn´t even search for .json files on start-up, which was visible in the log-files, no idea why that is. That obviously makes their method utterly useless to me.
In the end i just recreated the symlink, that works fine.
Vurticaw 11 sept. 2020 à 21h35 
Thanks for the guide, reminded me about symlinks (been years). I went to find the VRChat cache location after it hit a few GBs and found it. Anyways, I've tested the /J on mklink and VRChat does indeed work with directory junctions instead of .symlink (what you get with /D) it will create what appears to be a directory shortcut on explorer

use the following: mklink /J "C:\Users\<WindowsUserName>\AppData\LocalLow\VRChat" "D:\<LocationYouWant>\VRChat"

If successful you should see Junction created for C:\Users\<WindowsUserName>\AppData\LocalLow\VRChat <<===>> D:\<LocationYouWant>\VRChat

Change D:\ to which ever drive you're going to use aside from C:\

Hope this helps those that are having trouble with KoyoRed's other methods

Kyuubi 3 sept. 2020 à 11h45 
Thank you very much, i figured it out and did it exactly like that.

That is also how my question came up in the first place, as i wanted to do it the way they suggested now in the recent announcement but suprise surprise, it is not working. Still troubleshooting currently....
iiyko  [créateur] 3 sept. 2020 à 11h39 
hey Kyuubi, to delete the symlink all you have to do is delete the symlink folder / files. Although, as of vrchat's recent update I believe symlinks are broken anyway.
Kyuubi 3 sept. 2020 à 7h55 
I did this in 2018, according to this guide, worked fine. Now i would like to undo the symlink but i don´t know, what the best approach would be, in this case. Maybe others have the same question and you could add something related to your guide? @KoyoRed
SakuraUsagiVR.ttv 31 aout 2020 à 23h37 
What if C: drive is a HDD and D: drive is a SSD. How would I go about making sure I can safely move the cache?
Salad Nibbles 4 juil. 2020 à 16h56 
I had an issue where there error was "The system cannot find the path specified" After some friendly teamwork, I found out that having a space in my user name was causing an issue. if you have a space i.e. "C:\Users\Jessie Smith\AppData\LocalLow" You would want to type "C:\Users\Jessie~1\AppData\LocalLow" etc etc Here is a link for more information, hope it helps someone else! (I finally found a use for the tilde!) http://help.seagullscientific.com/10.1/en/Content/file_command_params_longfilenames.htm
R. Wolfe 4 janv. 2020 à 22h13 
Friendly advice, for the mklink parts and such, you can use the variable %userprofile% , such as:

mklink /d "%userprofile%\AppData\LocalLow\VRChat" "[new location]"

where you replace the [new location] with where you moved your stuff. This helps so you don't need to know your windows username :winter2019happyyul: