--no-cache option
This commit is contained in:
@ -17,6 +17,10 @@ module.exports = {
|
||||
description: 'Enable gzip compression, reduces bandwidth.', group: 'server'
|
||||
},
|
||||
{
|
||||
name: 'no-cache', alias: 'n', type: Boolean,
|
||||
description: 'Disable etag-based caching.', group: 'server'
|
||||
},
|
||||
{
|
||||
name: 'help', alias: 'h', type: Boolean,
|
||||
description: 'Print these usage instructions', group: 'misc'
|
||||
},
|
||||
|
@ -83,8 +83,11 @@ function getApp (options) {
|
||||
})
|
||||
}
|
||||
|
||||
app.use(conditional())
|
||||
app.use(etag())
|
||||
/* Cache */
|
||||
if (!options['no-cache']) {
|
||||
app.use(conditional())
|
||||
app.use(etag())
|
||||
}
|
||||
|
||||
/* mime-type overrides */
|
||||
if (options.mime) {
|
||||
|
Reference in New Issue
Block a user