How to turn off caching?

4 views
Skip to first unread message

John Dallman

unread,
Nov 19, 2025, 7:30:22 AMNov 19
to emscripte...@googlegroups.com
I've come to Emscripten with very little knowledge of web technologies beyond writing static HTML by hand. I'm a C programmer by trade, who is happier with assembler than C++. This means I lack some background for understanding Emscripten and Node.js. I'm making progress with my Emscripten/WebAssembly project, but I have a problem at link time. I get this message: 

> cache:INFO: generating system asset: symbol_lists/5694415f89fa8ad6c14652d4e41d66929bce05f4.json... 
> (this will be cached in "/path/to/server/disk/emscripten/v3.1.71/emsdk/upstream/emscripten/cache/symbol_lists/5694415f89fa8ad6c14652d4e41d66929bce05f4.json" 
> for subsequent builds)
> cache:INFO:  - ok

My organisation really, really, wants to make sure that everyone using a compiler has the same version of the compiler. We're had terrible trouble on other platforms with product bugs not reproducing in different versions of a compiler. Therefore, when possible we want to put compilers on a server's disk and have everyone use the same copy of the compiler.

However, linking is generating symbol lists on server disk, which is a waste of disk space, and also useless, because I'm linking everything into one monolithic program. I can't find any option to turn this off at https://emscripten.org/docs/tools_reference/settings_reference.html, although I may not be using the right search terms. 

How do I suppress this caching? 

Thanks in advance, 

John  

Sam Clegg

unread,
Nov 19, 2025, 1:42:20 PM (14 days ago) Nov 19
to emscripte...@googlegroups.com
We don't have any option to turn off this caching specifically.

We have a config file settings called `FROZEN_CACHE` (or equivalently `EM_FROZEN_CACHE` in the environment) that marks the entire cache was read-only.   This has the effect of nor using the symbol cache, but also prevents new libraries from being built on demand.

I think perhaps you are misunderstanding the purpose of the `.json` file in the cache though.   Its useful even for monolithic programs.  It means that future links of the same program (assuming you don't change the command line flags) will go faster.

i.e. if you build the same program 3 times:

```
$ emcc hello.c -o out.js



--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/emscripten-discuss/CAH1xqgk7HxwRmGqHxoGofUXQCmAF%3DDYE1Z5RfTZF%2Bn3oyh-Fyw%40mail.gmail.com.

Sam Clegg

unread,
Nov 19, 2025, 1:44:17 PM (14 days ago) Nov 19
to emscripte...@googlegroups.com
Sorry I didn't finish typing my response.

If you build the same program 3 times in row like this:


```
$ emcc hello.c -o out.js
$ emcc hello.c -o out.js
$ emcc hello.c -o out.js
```

The first run will do a bunch of work to figure out the complete set of JS symbols that are available.   The second two can skip this step and instead load the symbol list from the cache.  So its not something I think you would ever want to disable.
Reply all
Reply to author
Forward
0 new messages