From c407ad3d3499ab1142b740fb0c6163be68e5dfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Fri, 23 Mar 2012 19:28:46 +0100 Subject: [PATCH] re-enabled maxAge setting. maxAge is now in seconds, not milliseconds. --- settings.json.template | 6 +++--- src/node/server.js | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/settings.json.template b/settings.json.template index 6c0ebd385..3ae0a9815 100644 --- a/settings.json.template +++ b/settings.json.template @@ -39,9 +39,9 @@ but makes it impossible to debug the javascript/css */ "minify" : true, - /* How long may clients use served javascript code? Without versioning this - is may cause problems during deployment. */ - "maxAge" : 21600000, // 6 hours + /* How long may clients use served javascript code (in seconds)? Without versioning this + is may cause problems during deployment. Set to 0 to disable caching */ + "maxAge" : 21600, // 6 hours /* This is the path to the Abiword executable. Setting it to null, disables abiword. Abiword is needed to enable the import/export of pads*/ diff --git a/src/node/server.js b/src/node/server.js index 19df6e728..8e6d6fa0b 100644 --- a/src/node/server.js +++ b/src/node/server.js @@ -51,8 +51,9 @@ console.log("Report bugs at https://github.com/Pita/etherpad-lite/issues") var serverName = "Etherpad-Lite " + version + " (http://j.mp/ep-lite)"; -//cache 6 hours -exports.maxAge = 1000*60*60*6; +//cache 6 hours, by default +var hour = 60*60; +exports.maxAge = settings.maxAge || 6 * hour; //set loglevel log4js.setGlobalLogLevel(settings.loglevel);