Remove caching, creates more problems than it solves

This commit is contained in:
Peter 'Pita' Martischka 2011-06-27 23:10:18 +02:00
parent 75dd468f50
commit a4b9427896
2 changed files with 7 additions and 9 deletions

View File

@ -225,7 +225,7 @@ exports.padJS = function(req, res)
pathStr = path.normalize(__dirname + "/../var/minified_pad.js");
}
res.sendfile(pathStr, { maxAge: server.maxAge });
res.sendfile(pathStr);
})
}
//minifying is disabled, so load the files with jquery

View File

@ -32,8 +32,6 @@ var path = require('path');
var minify = require('./minify');
var serverName = "Etherpad-Lite ( http://j.mp/ep-lite )";
//cache a week
exports.maxAge = 1000*60*60*24*1;
async.waterfall([
//initalize the database
@ -56,7 +54,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/.." + req.url.split("?")[0]);
res.sendfile(filePath, { maxAge: exports.maxAge });
res.sendfile(filePath);
});
//serve minified files
@ -81,7 +79,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/../static/pad.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
res.sendfile(filePath);
});
//serve timeslider.html under /p/$padname/timeslider
@ -89,7 +87,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/../static/timeslider.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
res.sendfile(filePath);
});
//serve index.html under /
@ -97,7 +95,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/../static/index.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
res.sendfile(filePath);
});
//serve robots.txt
@ -105,7 +103,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/../static/robots.txt");
res.sendfile(filePath, { maxAge: exports.maxAge });
res.sendfile(filePath);
});
//serve favicon.ico
@ -113,7 +111,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/../static/favicon.ico");
res.sendfile(filePath, { maxAge: exports.maxAge });
res.sendfile(filePath);
});
//let the server listen