A Yarn Scripts Cache implementation using the local file system. By default, the cache folder will be located in yarns global folder.
The following configuration options are available:
Disables this cache entirely. No reads or writes are performed.
- Environment variable:
YSC_FILE_DISABLED
- Config field:
cacheConfigs.file.cacheDisabled
- Default value: false
Disables reading from the file cache.
- Environment variable:
YSC_FILE_READ_DISABLED
- Config field:
cacheConfigs.file.cacheReadDisabled
- Default value: false
Disables writing to the file cache.
- Environment variable:
YSC_FILE_WRITE_DISABLED
- Config field:
cacheConfigs.file.cacheWriteDisabled
- Default value: false
The maximum age in milliseconds of script execution results to store.
- Environment variable:
YSC_FILE_MAX_AGE
- Config field:
cacheConfigs.file.maxAge
- Default value:
2592000000
(30 days in milliseconds)
The maximum amount of script execution results to store.
- Environment variable:
YSC_FILE_MAX_AMOUNT
- Config field:
cacheConfigs.file.maxAmount
- Default value:
1000
The name of the folder to store the cache in. The folder will be located in yarns global folder.
- Environment variable:
YSC_FILE_CACHE_FOLDER_NAME
- Config field:
cacheConfigs.file.cacheFolderName
- Default value:
yarn-scripts-cache
The location of the folder to store the cache in. If a relative path is provided, it will be resolved against the current working directory. If this option is provided, the cache folder name option is ignored.
Note: You can use the same cache folder location for multiple projects or workspaces. But note that the cleanup options do not distinguish between different projects or workspaces, therefore you might want to increase the default options accordingly.
- Environment variable:
YSC_FILE_CACHE_FOLDER_LOCATION
- Config field:
cacheConfigs.file.cacheFolderLocation
- Default value: Current working directory.
- Examples:
C:\path\to\cache
(absolute path)path\to\cache\within\current\working\directory
(relative path)