purge-cloudflare-cache
Purges cloudflare cache based on a local folder's content. It reads file names from folder and based on a specific domain it purges the cache.
Last updated 2 years ago by back4app .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install purge-cloudflare-cache 
SYNC missed versions from official npm registry.

purge-cloudflare-cache

NodeJs module to purge cloudflare cache based on a local folder's content. It reads file names from folder and based on a specific domain it purges the cache.

It uses async and await, so, it requires node 7.6+

Get Cloudfare's domain zone and key at https://www.cloudflare.com/a/overview/yourdomain.com

using npx:

npm install -g npx

npx purge-cloudflare-cache your@email.com your_cloudflare_key the_domain_zone https://your.website.com some/folder

or using yargs

npx purge-cloudflare-cache -e your@email.com -k your_cloudflare_key -z the_domain_zone -d https://your.website.com -f some/folder

or just install it globally and run purge command

npm install -g purge-cloudflare-cache

purge your@email.com your_cloudflare_key the_domain_zone https://your.website.com some/folder

or using yargs

purge -e your@email.com -k your_cloudflare_key -z the_domain_zone -d https://your.website.com -f some/folder

Ex.:

For a some/folder tree like:

├── assets
│   ├── fonts
│   │   ├── roboto-regular.ttf
│   │   └── roboto.scss
│   ├── icon
│   │   └── favicon.ico
│   └── imgs
│       └── logo.png
├── build
│   ├── main.css
│   ├── main.js
├── index.html

It will purge cache for files:

https://your.website.com/index.html
https://your.website.com/build/main.css
https://your.website.com/build/main.js
https://your.website.com/assets/imgs/logo.png
https://your.website.com/assets/icon/favicon.ico
https://your.website.com/assets/fonts/roboto.css
https://your.website.com/assets/fonts/roboto-regular.ttf

Current Tags

  • 1.2.2                                ...           latest (2 years ago)

9 Versions

  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |