PuppeteerNode.trimCache() 方法
🌐 PuppeteerNode.trimCache() method
删除由提供的 Puppeteer 配置识别的缓存目录中所有非当前的 Firefox 和 Chrome 二进制文件。当前的浏览器版本由 Puppeteer 解析 PUPPETEER_REVISIONS 确定,除非提供了 configuration.browserRevision。
🌐 Removes all non-current Firefox and Chrome binaries in the cache directory identified by the provided Puppeteer configuration. The current browser version is determined by resolving PUPPETEER_REVISIONS from Puppeteer unless configuration.browserRevision is provided.
语法
🌐 Signature
class PuppeteerNode {
trimCache(): Promise<void>;
}
返回:
Promise<void>
附注
🌐 Remarks
请注意,该方法不会检查主机上安装的使用相同缓存目录的任何其他 Puppeteer 版本是否需要非当前二进制文件。
🌐 Note that the method does not check if any other Puppeteer versions installed on the host that use the same cache directory require the non-current binaries.