https://github.com/fjc0k/qiniu-cache-refresh
基于配置的七牛缓存刷新命令行工具。
https://github.com/fjc0k/qiniu-cache-refresh
qiniu qiniu-cache-refresh qiniu-cli
Last synced: about 3 hours ago
JSON representation
基于配置的七牛缓存刷新命令行工具。
- Host: GitHub
- URL: https://github.com/fjc0k/qiniu-cache-refresh
- Owner: fjc0k
- Created: 2018-07-19T05:04:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T12:03:49.000Z (about 7 years ago)
- Last Synced: 2025-08-09T13:48:27.871Z (about 2 months ago)
- Topics: qiniu, qiniu-cache-refresh, qiniu-cli
- Language: JavaScript
- Homepage: https://npm.im/qiniu-cache-refresh
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# qiniu-cache-refresh
基于配置的七牛缓存刷新命令行工具。

## 安装
```bash
yarn add qiniu-cache-refresh -D// 或者
npm i qiniu-cache-refresh -D
```## 用法
### 配置
在项目根目录下新建 `qiniu.config.js` 文件,写入配置:
```js
module.exports = {
accessKey: 'Access 密钥',
secretKey: 'Secret 密钥',
cacheRefresh: {
urls: [
'https://foo.bar/about.html',
'https://foo.bar/sitemap.html'
// 更多 url
],
dirs: [
'https://foo.bar/images',
'https://foo.bar/pages'
// 更多目录
]
}
}
```### 使用
```bash
yarn qiniu-cache-refresh// 或者
npx qiniu-cache-refresh
```在 `package.json` 中你可以这么使用:
```json
{
"scripts": {
"deploy:qiniu": "qiniu-cache-refresh"
}
}
```