- Home /
Couldn't connect to cache server
so when i press play in the unity editor, I get an error saying 'Couldn't connect to cache server. Unable to connect to host localhost:(numbers)' on the bottom left. Is there a fix to this?
Answer by DavidLieder · Nov 22, 2018 at 01:36 PM
I've also been stumped by this error in the past. I discovered that it sometimes occurred when Unity could not read the contents of the cache folder, because of old data. A good first step to solve this is the following:
In the Unity editor, use your mouse to select the menu item "Edit--->Preferences--->Cache Server" and press the button to clean the cache. Sometimes when there is a new Unity editor version, the editor gets confused by old data, or might not recognize all the files in the cache.
Then go to "GI Cache" (also in the preferences) and clean the cache.
Alternately, you can find the actual folders and completely delete everything in them and let Unity rebuild it.
The Unity cache can get crazy if you have a lot of different projects, or if you have never cleaned the cache. Old lightmaps and data from older editors gets mixed up with your new cache needs. So cleaning the cache is a good way to start troubleshooting the "Couldn't connect to Cache Server" error.
How do you clear the cache if you can't connect to it? At least in 2019, I don't see a button to clear the cache in the Cache Server preferences.
Answer by misher · Mar 07, 2019 at 10:31 AM
I wonder why don't they just make a cache folder inside a project folder, there are things like Temp and Library, why there could not be also the Cache folder, so you don't mix it with all other projects.
$$anonymous$$aybe for one person, but that would also bloat the project.
And when more than one person works on a project, each dev has a different cache. It's common for a $$anonymous$$m to delegate separate duties to each person. Each dev's cache is completely different. If you had a common cache in the project folder, it would bloat it horribly. Backing up Unity projects is already storage-greedy, and adding a bloated cache folder would make it worse. Of course, version control could ignore it, but imagine your $$anonymous$$aya or Blender art designers who have 15 GB of models, and your level designer has 30 GB of lightmaps. They don't need to dump all this together when they are just doing prototypes and not the final build.
Your answer
Follow this Question
Related Questions
Load image from server 0 Answers
How to use cache-server to share imports with other team members? 0 Answers
How I can install Unity Cache Server as Windows Service on 2012 Server R2? 1 Answer
How to fix this error "Cache server is enabled, but endpoint string is not valid " ? 0 Answers
Cache server works only partially 0 Answers