module.constants.compileCacheStatus
稳定性: 1.1 - 处于活跃开发中
以下常量作为对象中返回的 status 字段返回,由 module.enableCompileCache() 用于指示尝试启用 模块编译缓存 的结果。
【The following constants are returned as the status field in the object returned by
module.enableCompileCache() to indicate the result of the attempt to enable the
module compile cache.】
| Constant | Description |
|---|---|
ENABLED |
Node.js has enabled the compile cache successfully. The directory used to store the
compile cache will be returned in the directory field in the
returned object.
|
ALREADY_ENABLED |
The compile cache has already been enabled before, either by a previous call to
module.enableCompileCache(), or by the NODE_COMPILE_CACHE=dir
environment variable. The directory used to store the
compile cache will be returned in the directory field in the
returned object.
|
FAILED |
Node.js fails to enable the compile cache. This can be caused by the lack of
permission to use the specified directory, or various kinds of file system errors.
The detail of the failure will be returned in the message field in the
returned object.
|
DISABLED |
Node.js cannot enable the compile cache because the environment variable
NODE_DISABLE_COMPILE_CACHE=1 has been set.
|