Skip to content

Commit

Permalink
[cloudhead#188] Allow disabling of cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cphoover committed Apr 27, 2017
1 parent 9fabe33 commit 7ee9f41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
node-static
===========


**THIS FORK ALLOWS FOR DISABLING OF CACHE VIA CLI**

> a simple, *rfc 2616 compliant* file streaming module for [node](http://nodejs.org)
node-static understands and supports *conditional GET* and *HEAD* requests.
Expand Down
6 changes: 5 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ if (argv.version) {
process.exit(0);
}

if (argv.cache) {
if (argv.cache === 0 || argv.cache) {
var loweredCache = argv.cache.toString().toLowerCase();
if (loweredCache === 'false' || loweredCache === 'f') {
argv.cache = 0;
}
(options = options || {}).cache = argv.cache;
}

Expand Down

0 comments on commit 7ee9f41

Please sign in to comment.