Files
node/doc/api
Joyee Cheung 4baf4637eb 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-30 15:52:15 -03:00
..
2024-03-18 14:27:59 +00:00
2024-08-14 08:15:00 +02:00
2023-04-23 13:34:08 +00:00
2024-08-19 10:01:38 -03:00
2024-08-14 08:36:59 +02:00
2024-07-17 10:15:03 +02:00
2024-08-25 18:19:06 -03:00
2024-08-05 11:15:45 -03:00
2024-07-16 12:01:05 +02:00
2024-07-17 10:15:03 +02:00
2024-04-23 10:47:15 +01:00
2024-07-28 09:51:32 +02:00
2024-08-05 14:23:50 -03:00
2024-08-30 15:52:12 -03:00
2024-07-17 10:15:03 +02:00
2024-04-23 10:47:15 +01:00
2024-03-26 17:42:38 +00:00
2024-08-05 11:15:41 -03:00
2024-05-08 07:12:37 +02:00
2024-05-15 08:45:30 +02:00