node-http-server – Diff between revs 35 and 37
?pathlinks?
Rev 35 | Rev 37 | |||
---|---|---|---|---|
Line 26... | Line 26... | |||
26 | // Cache handling. |
26 | // Cache handling. |
|
27 | Cache.prototype.process = function(resource, input, type) { |
27 | Cache.prototype.process = function(resource, input, type) { |
|
28 | EventEmitter.call(this); |
28 | EventEmitter.call(this); |
|
29 | const self = this; |
29 | const self = this; |
|
Line -... | Line 30... | |||
- | 30 | |
||
30 | |
31 | // Read the resource and cache or not depending on configuration settings. |
|
31 | fs.stat(resource, (error, stats) => { |
32 | fs.stat(resource, (error, stats) => { |
|
32 | var expires = 0; |
33 | var expires = 0; |
|
33 | Object.keys(self.config.site.cache).forEach((key) => { |
34 | Object.keys(self.config.site.cache).forEach((key) => { |
|
34 | self.config.site.cache[key].forEach((expire) => { |
35 | self.config.site.cache[key].forEach((expire) => { |