Node.js' Fastly Purging API implementation
Implements Fastly Purging API, see https://docs.fastly.com/api/purge
Dependencies
- Node >=0.10
- npm >=1.2.1
Install
npm install [fastly-purge]
API
var FAKE_API_KEY = 'wadus'; var FAKE_PURGE_URL = 'http://example.com/image.jpg';var FAKE_SERVICE_ID = 'wadus_service_id';var FAKE_SURROGATE_KEY = 'wadus_key'; var fastlyPurge = FAKE_API_KEY;var fastlySoftPurge = FAKE_API_KEY softPurge: true ; { console;}
Instant Purge an individual URL
fastlyPurge;// orfastlySoftPurge;
Instant Purge everything from a service
fastlyPurge;
Note: service purging does not support soft purge
Instant Purge a particular service of items tagged with a Surrogate Key
fastlyPurge;// orfastlySoftPurge;
Soft Purge an individual URL
fastlyPurge;// orfastlySoftPurge;
Soft Purge a particular service of items tagged with a key
fastlyPurge;// orfastlySoftPurge;
Contributing
See CONTRIBUTING.md.