Clear file cache by http request. Netease specially.
npm install grunt-clearcache~0.4.1
shell
npm install grunt-clearcache --save
`
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js
grunt.loadNpmTasks('grunt-clearcache');
`
The "clearcache" task
$3
In your project's Gruntfile, add a section named clearcache to the data object passed into grunt.initConfig().
`js
grunt.initConfig({
options: {
url: 'http://127.0.0.1/Pro/Wap/full.json?',
defaultN: '1-6'
},
clear: {
basedir: 'img{n}.cache.netease.com/apps/wap/',
css: '2',
js: '1,3',
img: '1-3',
localRoot: 'test/upload/'
}
})
`
$3
#### options.url
Type: String
Default value: ''
A valid url of clear interface. Don't forget the last '?'.
#### options.defaultN
Type: String
Default value: '1-6'`