forked from carlos8f/buffet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Carlos Rodriguez
committed
Nov 2, 2012
1 parent
e8545fa
commit f67b208
Showing
3 changed files
with
34 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
exports.middleware = function (options) { | ||
return require('st')({ | ||
path: options.root, | ||
url: '/', | ||
|
||
cache: { | ||
fd: { | ||
max: 1000, // number of fd's to hang on to | ||
maxAge: 1000*60*60, // amount of ms before fd's expire | ||
}, | ||
|
||
stat: { | ||
max: 5000, // number of stat objects to hang on to | ||
maxAge: 1000 * 60, // number of ms that stats are good for | ||
}, | ||
|
||
content: { | ||
max: 1024*1024*64, // how much memory to use on caching contents | ||
maxAge: 1000 * 60 * 10, // how long to cache contents for | ||
} | ||
} | ||
}); | ||
}; |