From a4b9427896e565dff3c26e916991f7ae169e6beb Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Mon, 27 Jun 2011 23:10:18 +0200 Subject: [PATCH] Remove caching, creates more problems than it solves --- node/minify.js | 2 +- node/server.js | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/node/minify.js b/node/minify.js index 7245b214..bc1612aa 100644 --- a/node/minify.js +++ b/node/minify.js @@ -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 diff --git a/node/server.js b/node/server.js index 712638d1..0166de44 100644 --- a/node/server.js +++ b/node/server.js @@ -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