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>;
}
Returns:
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.