0.1.1 • Published 3 years ago
glob-cache-warmer v0.1.1
glob-cache-warmer
A simple crawler that makes a request to a specific domain based on a local file list specified in glob format.
It is used as a countermeasure against delay of TTFB due to cache purge immediately after deploy such as firebase hosting.
Depends
- Node.js (>= 14.x)
Usage
# Install
$ npm i -D glob-cache-warmer
# Crawling your website
#
# ref. https://github.com/isaacs/node-glob#glob-primer
# n.b. please use bash such as git bash instead of powershell when windows
#
$ npx glob-cache-warmer 'https://example.com' '+(images|fonts)/**/*.*'
# Ignore webroot (first) directory
$ npx glob-cache-warmer 'https://example.com' 'dist/**/*.*' -r