TheWaveVR

TheWaveVR

Not enough ratings
Relocating the TheWaveVR's File-Cache to Another Drive
By Austin
By using symbolic links (a windows file system feature), it's possible to relocate the potentially large file-cache that TheWaveVR's client generates over to another drive, while making the files appear to still be in their old location.
 
Rate  
Favorite
Favorited
Unfavorite
What are symbolic links? How can they help me?
In a nutshell, symbolic links are a Windows file system feature that's like shortcuts on steroids. They allow the operating system itself to deceive applications about the actual location of files; for example, letting an application believe it's accessing a set of files on one drive when those files are actually on a different drive, or even an entirely different computer.

This can be useful for the TheWaveVR, because the client currently has a hard-coded location for its cache of downloaded models and textures for shows, and this cache can grow to a rather large size over time. By using a "directory symbolic link", we can instead move those files to another (larger) drive, while letting the client still believe they're in the old location so everything continues to work as usual.
How to create the symbolic link
  • Close TheWaveVR
  • Open an explorer window, and set the address to:
    %userprofile%\AppData\LocalLow\WaveVR Inc_\TheWaveVR
  • Copy the "Cache" folder to whatever drive you want to put it on (for example, I moved it into "D:\TheWaveVR Storage\").
  • Open a command prompt in administrator-mode, and use the following command after changing the last quoted string to wherever you moved the cache to:
    mklink /d "%userprofile%\AppData\LocalLow\WaveVR Inc_\TheWaveVR\Cache" "D:\TheWaveVR Storage\Cache"
  • You should see a message such as:
    symbolic link created for C:\Users\Austin\AppData\LocalLow\WaveVR Inc_\TheWaveVR\Cache <<===>> D:\TheWaveVR Storage\Cache
  • If you look back in the directory that originally contained the cache (the one in AppData), you should now see a "Cache" directory again, but with a shortcut icon on it. If you double-click it, you should navigate down into it and it'll look like the cache is still on the C-drive, even though now you're actually navigating whatever drive you moved it to.

For reference, the official documentation for "mklink" is at: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink

To open the administrator-mode command prompt, I recommend: WinKey -> Type:"cmd" -> Right-Click -> "Run as administrator"
How to undo the changes (if desired)
  • Delete the symbolic link (the folder showing the shortcut-icon) as though it was just a file.
  • Copy the "Cache" folder back to where it used to be.
Caveats
Later on, if/when the development team relocates the client's cache, automated attempts to copy and then delete the old cache's location will work, but would just delete the symbolic link rather than the actual old cache files. That just means things would work fine, but there'd be some unused files to manually delete (wherever the cache had been moved to earlier).
< >
3 Comments
mputtr Jul 14 @ 9:52am 
This is perfect! Thank you!
martinmartyzzz Feb 17 @ 3:51pm 
Nice job, Austin. THANKS! It's a great idea and well documented. On my system TheWaveVR is currently taking 11.5GB and the cache is 13.5GB. I appreciate your removal and caveats sections as well.
Thanks Austin for the guide!

Due to feedback about the location and size of TheWaveVR's cache, we've put it on the list of needed fixes to let you set the location of the file cache of our app.