Allow caching up to a week

This commit is contained in:
Peter 'Pita' Martischka 2011-05-28 20:43:00 +01:00
parent 537fca9ca4
commit 4eccf72baa
2 changed files with 9 additions and 6 deletions

View file

@ -7,6 +7,7 @@ var pro = require("uglify-js").uglify;
var path = require('path');
var Buffer = require('buffer').Buffer;
var gzip = require('gzip');
var server = require('./server');
/**
* Answers a http request for the pad javascript
@ -201,7 +202,7 @@ exports.padJS = function(req, res)
pathStr = path.normalize(__dirname + "/../var/minified_pad.js");
}
res.sendfile(pathStr);
res.sendfile(pathStr, { maxAge: server.maxAge });
})
}
//minifying is disabled, so load the files with jquery