From 0625a434489816efff2494eff77a82e43539ea8f Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 14 Jul 2010 16:07:57 +0200 Subject: Overcome cache so that JSON configuration file is not stale (fixes #21). --- lib/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/main.js b/lib/main.js index 9e7a413..e14f947 100644 --- a/lib/main.js +++ b/lib/main.js @@ -96,6 +96,11 @@ function initialize(callback) { preferences.set(prefName, JSONURLDefault); } + // Randomize URL to avoid caching + // TODO see https://fedorahosted.org/bugzilla-triage-scripts/ticket/21 + // for more thorough discussion and possible further improvement + urlStr += (urlStr.match(/\?/) == null ? "?" : "&") + (new Date()).getTime(); + Request({ url: urlStr, onComplete: function () { -- cgit