Skip to content

Commit

Permalink
caching at the request level in order to work around some issues of e…
Browse files Browse the repository at this point in the history
…xpress 2
  • Loading branch information
Joachim Kainz committed May 16, 2012
1 parent d07c8c5 commit ca025c7
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/htmlcompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
}

templateHtml.push({
name: name,
content: content
name:name,
content:content
});
return done();
});
Expand All @@ -119,15 +119,14 @@
}

module.exports = function (module) {
var cache = {
templates: {},
files: {}
};

return function (req, res, next) {
var parsed = url.parse(req.url, true, true);
var cache = {
templates:{},
files:{}
},
parsed = url.parse(req.url, true, true);

debug("url", parsed);
debug("url", req.url);

if (!parsed.pathname || parsed.pathname === '/') {
res.statusCode = 301;
Expand Down

0 comments on commit ca025c7

Please sign in to comment.