The following constants are returned as the status
field in the object returned by enableCompileCache to indicate the result of the attempt to enable the module compile cache.
namespace
module.default.constants.compileCacheStatus
namespace compileCacheStatus
The compile cache has already been enabled before, either by a previous call to enableCompileCache, or by the
NODE_COMPILE_CACHE=dir
environment variable. The directory used to store the compile cache will be returned in thedirectory
field in the returned object.Node.js cannot enable the compile cache because the environment variable
NODE_DISABLE_COMPILE_CACHE=1
has been set.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.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.