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);