Announcement

Collapse
No announcement yet.

[HOW TO] Change local data cache location

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [HOW TO] Change local data cache location

    If you work with the Unreal Engine 4 you probably know what Derived Data Cache is. There is a nice article about it: https://docs.unrealengine.com/latest...che/index.html which also explains you how to change the location you use to share your DDC with other people. But what if you want to change the location of the DDC itself? Your local cache. By default, the local cache uses your Engine/DerivedDataCache folder. What if you want to move it to another location? For example, to a separate HDD. You can! There's another environment variable you can set: UE-LocalDataCachePath, just set it to any path you want!

    Note #1: I haven't tested it on a binary build of the engine (the one you download from the Launcher) but I assume that it will not work. For more details, open Engine/Config/BaseEngine.ini, find a section called [InstalledDerivedDataBackendGraph] and compare it to the section called [DerivedDataBackendGraph].
    Note #2: This will change data cache location for ALL your compiled copies of the engine, which may result in conflict if you have multiple copies on your machine!
    Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

    #2
    Thanks was looking into this myself. Can you explain which baseEngine.ini that needs updating as I have several.

    My issue is that I have unreal engine on my B: ssd drive and yet it insists on putting it in this location
    C:\Users\pc\AppData\Local\UnrealEngine\Common\DerivedDataCache\

    Comment


      #3
      Originally posted by paulr70 View Post
      Thanks was looking into this myself. Can you explain which baseEngine.ini that needs updating as I have several.

      My issue is that I have unreal engine on my B: ssd drive and yet it insists on putting it in this location
      C:\Users\pc\AppData\Local\UnrealEngine\Common\DerivedDataCache\
      If you have downloaded the engine from the Launcher, then you have to edit [UE4_ROOT]\Engine\Config\BaseEngine.ini

      Find the [InstalledDerivedDataBackendGraph] section, then find this line in it:

      Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%ENGINEVERSIONAGNOSTICUSERDIR%DerivedDataCache")

      As you can see, the "Path" parameters tells the engine where to save DDC. By default it's in AppData folder. So just replace it with any path you want (the path can be relative or absolute)

      Note, that I haven't tested this method myself!

      If you compiled the engine from GitHub source then just create an environment variable UE-LocalDataCachePath and set the path as it's value. Keep in mind, that in this case it will change the DDC directory for all compiled versions of the engine you have. This should work - I tested it.
      Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

      Comment


        #4
        If I compiled the engine from GitHub source, then how can I recreate the Compressed.ddp for engine's local Derived Data Cache?

        I've tried some, but everytime I import some thing, engine still tries to compile shader, and my generated Compressed.ddp only have 80M.

        Comment


          #5
          @steve3d:

          I am not sure about Compessed.ddp but you can use this command:

          UE4Editor-Cmd [GameName] -run=DerivedDataCache -fill -DDC=CreatePak

          to create a redistributable package from your DDC.
          Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

          Comment


            #6
            Thank you Robert, that worked

            Comment


              #7
              NOPE Don't work


              Originally posted by Robert Khalikov View Post
              If you have downloaded the engine from the Launcher, then you have to edit [UE4_ROOT]\Engine\Config\BaseEngine.ini

              Find the [InstalledDerivedDataBackendGraph] section, then find this line in it:

              Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%ENGINEVERSIONAGNOSTICUSERDIR%DerivedDataCache")

              As you can see, the "Path" parameters tells the engine where to save DDC. By default it's in AppData folder. So just replace it with any path you want (the path can be relative or absolute)

              Note, that I haven't tested this method myself!

              If you compiled the engine from GitHub source then just create an environment variable UE-LocalDataCachePath and set the path as it's value. Keep in mind, that in this case it will change the DDC directory for all compiled versions of the engine you have. This should work - I tested it.

              Comment


                #8
                Originally posted by Drixil View Post
                NOPE Don't work
                I have to argue there with you Drixil, you must of made a mistake.
                Worked a treat for me, this is what mine now looks like, saving me a nice 10GB on my OS dedicated SSD.

                Code:
                [InstalledDerivedDataBackendGraph]
                MinimumDaysToKeepFile=7
                Root=(Type=KeyLength, Length=120, Inner=AsyncPut)
                AsyncPut=(Type=AsyncPut, Inner=Hierarchy)
                Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=CompressedPak, Inner=EnginePak, Inner=Local)
                Boot=(Type=Boot, Filename="%ENGINEUSERDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512)
                Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="X:\UE4DataCache")

                I can confirm this works as expected on the 4.11 Launcher version of the engine.

                You can also copy the EXISTING Data Cache folder and put it in your new location and everything loads as quickly as it did before!

                Perfect!!

                Thanks for the help/Tutorial!!
                Last edited by Nemecys; 05-02-2016, 11:25 AM.

                Comment


                  #9
                  Originally posted by Drixil View Post
                  NOPE Don't work
                  It might be the name of your new folder. Don't use "DerivedDataCache" again if you put it in %GAMEDIR%, where already has a DerivedDataCache folder.

                  I set the dir to "%GAMEDIR%DerivedDataCache" with no effects plus the engine rewrite it to default.
                  Then I changed it to: "%GAMEDIR%LocalDerivedDataCache", it worked like a charm.

                  Comment


                    #10
                    Originally posted by jojogogo View Post
                    It might be the name of your new folder. Don't use "DerivedDataCache" again if you put it in %GAMEDIR%, where already has a DerivedDataCache folder.

                    I set the dir to "%GAMEDIR%DerivedDataCache" with no effects plus the engine rewrite it to default.
                    Then I changed it to: "%GAMEDIR%LocalDerivedDataCache", it worked like a charm.
                    Thanks for the help dude!

                    Comment


                      #11
                      Can you please make a youtube video tutorial of this please? for some reason it does not work and i need to clear space quickly, my sdd just fills up to much.
                      What i wanna do is move everything ue4 related (cache & vault, not the projects) to an other HDD drive, let's say the path would be : E:\UE4DataCache.
                      Im using UE 4.15 & 4.18.2 downloaded trough Epic Games Launcher if that helps solve my problem.
                      Thanks.
                      And let me know if there is a video on how to do this please.
                      Marketplace: Decals Road Markings

                      https://www.unrealengine.com/marketp...-road-markings

                      Road Signs / Lines / Manholes For your streets or race games.

                      My Developer Store :
                      https://gamedevcentral.io/devstore/mike_seller/

                      Like and Share our FaceBook Page For More :

                      https://www.facebook.com/Unreal-Blac...3951492397088/


                      Join and Share our FaceBook Group where you can Sell/Promote

                      your Finished Unreal Engine 4 "Ready" Projects :

                      https://www.facebook.com/groups/2475063775924081/

                      Comment


                        #12
                        Anyone please?
                        Thanks.
                        Marketplace: Decals Road Markings

                        https://www.unrealengine.com/marketp...-road-markings

                        Road Signs / Lines / Manholes For your streets or race games.

                        My Developer Store :
                        https://gamedevcentral.io/devstore/mike_seller/

                        Like and Share our FaceBook Page For More :

                        https://www.facebook.com/Unreal-Blac...3951492397088/


                        Join and Share our FaceBook Group where you can Sell/Promote

                        your Finished Unreal Engine 4 "Ready" Projects :

                        https://www.facebook.com/groups/2475063775924081/

                        Comment


                          #13
                          Another way to move your DDC files to another location if you don't want to mess with the config location is to simply create a junction or shortcut to another drive/location. Just move the whole folder "C:\Users\<your user name>\AppData\Local\UnrealEngine" to a new location for me I put it on my second SSD drive root so I now have "F:\UnrealEngine" then just create a shortcut to the new location in "C:\Users\<your user name>\AppData\Local"

                          This moves not just the common DDC but potentially any other engine version specific files over to that same location, if you want to remove old engine version or common DDC files you can just go into F:\UnrealEngine and remove them there.

                          You can use the same trick for moving your VaultCache for the Launcher to a new location as well.

                          Also you can use a Junction instead of a shortcut, but most people are not comfortable with command line operations and batch files, so typically prefer Shortcuts and I think they basically the same thing, but for those interested you can use a batch file command like this to achieve the same result

                          mklink /j C:\Users\deanb\AppData\Local\UnrealEngine F:\UnrealEngine

                          Hope that helps.

                          Comment


                            #14
                            Thank you for this, things were getting hairy

                            Comment


                              #15
                              Why it's not in editor preferences or launcher settings?

                              Comment

                              Working...
                              X