Files
node/lib
Joyee Cheung ff5ef7083d src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE
This patch adds the following API for tools to enable compile
cache dynamically and query its status.

- module.enableCompileCache(cacheDir)
- module.getCompileCacheDir()

In addition this adds a NODE_DISABLE_COMPILE_CACHE environment
variable to disable the code cache enabled by the APIs as
an escape hatch to avoid unexpected/undesired effects of
the compile cache (e.g. less precise test coverage).

When the module.enableCompileCache() method is invoked without
a specified directory, Node.js will use the value of
the NODE_COMPILE_CACHE environment variable if it's set, or
defaults to `path.join(os.tmpdir(), 'node-compile-cache')`
otherwise. Therefore it's recommended for tools to call this
method without specifying the directory to allow overrides.

PR-URL: https://github.com/nodejs/node/pull/54501
Fixes: https://github.com/nodejs/node/issues/53639
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-08-28 23:22:57 +00:00
..
…
…
…
2024-08-25 07:30:10 +00:00
…
2024-01-12 16:09:48 +00:00
2024-07-08 15:55:43 +00:00
2023-11-11 16:25:08 +00:00
2024-08-14 11:18:49 +00:00
2023-04-03 17:47:28 +00:00
2024-02-02 15:25:34 +01:00
…
2024-05-30 09:07:17 -04:00
2024-06-07 15:51:44 +00:00
2024-07-07 00:56:04 +00:00
2024-07-04 16:19:36 +00:00
2024-08-27 14:58:36 +00:00