How do I set Zen DDC location to the project folder?

Go to
C:\Users\X\AppData\Local\UnrealEngine\Y\Saved\Config\Windows
X = “YourAccountName”
Y = “EngineVersion” for example 4.27

For 5.6 It’s under
C:\Users\X\AppData\Local\UnrealEngine\5.6\Saved\Config\WindowsEditor

Search for EditorSettings.ini
Open this file and search for
[/Script/UnrealEd.EditorSettings]
If above line doesnt exist create it and add below lines
LocalDerivedDataCache=(Path=“%GAMEDIR%DerivedDataCache”)
SharedDerivedDataCache=(Path=“%GAMEDIR%DerivedDataCache”)

Save file and after saving do not run editor yet until you mark file to be READ ONLY!!!
Right Click EditorSettings.ini go to Properties and Check Read Only and apply.
Done