lib/grover.rb in grover-0.5.1 vs lib/grover.rb in grover-0.5.2
- old
+ new
@@ -28,9 +28,13 @@
async (url, options) => {
let browser;
try {
browser = await puppeteer.launch(#{launch_params});
const page = await browser.newPage();
+
+ const cache = options.cache; delete options.cache;
+ await page.setCacheEnabled(cache);
+
if (url.match(/^http/i)) {
await page.goto(url, { waitUntil: 'networkidle2' });
} else {
await page.goto(`data:text/html,${url}`, { waitUntil: 'networkidle0' });
}