aliyun-cdn-refresh
Simplify refresh and push interface for aliyun cdn api
Last updated 3 years ago by kanasite .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install aliyun-cdn-refresh 
SYNC missed versions from official npm registry.

aliyun-cdn-refresh

Simplify Refresh and push interface for aliyun cdn api

const cdn = require('aliyun-cdn-refresh')({
    "accessKeyId": "YOUR_ALIYUN_CDN_ACCESS_KEY",
    "secretAccessKey": "YOUR_ALIYUN_CDN_ACCESS_SECRET",
    "endpoint": "https://cdn.aliyuncs.com",
    "timeout": 5000 // Request timeout in milliseconds for connecting phase and response receiving phase. Defaults to 5000, both are 5s. You can use timeout: 5000 to tell urllib use same timeout on two phase or set them seperately such as timeout: [3000, 5000], which will set connecting timeout to 3s and response 5s
});

To refresh CDN cache

cdn.refreshDir('http://yourcdndomain/img/');
cdn.refreshFile('http://yourcdndomain/img/1.png');
cdn.refreshFiles(['http://yourcdndomain/img/1.png', 'http://yourcdndomain/img/2.png']);

To push file into CDN cache

cdn.pushFile('http://yourcdndomain/img/1.png');
cdn.pushFiles(['http://yourcdndomain/img/1.png', 'http://yourcdndomain/img/2.png']);

Current Tags

  • 1.2.0                                ...           latest (3 years ago)

7 Versions

  • 1.2.0                                ...           3 years ago
  • 1.1.4                                ...           3 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 6
Last Day 1
Last Week 3
Last Month 7
Dependencies (7)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |