From 3ed00b3a8948ae9db8b0f4c711e74ef8fa06565d Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 12 Oct 2014 01:29:47 +0200 Subject: Don't allow cached weblog summary to age more than five minutes. --- org/madore/damlengine/WeblogSummary.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'org/madore/damlengine') diff --git a/org/madore/damlengine/WeblogSummary.java b/org/madore/damlengine/WeblogSummary.java index 8ce2635..4819017 100644 --- a/org/madore/damlengine/WeblogSummary.java +++ b/org/madore/damlengine/WeblogSummary.java @@ -40,7 +40,9 @@ public final class WeblogSummary { public static synchronized WeblogSummary getSummary(Context.DynamicContext dc) { if ( singleton != null - && ( dc == null || singleton.obtainedTime > dc.modTime ) ) + && ( dc == null + || ( singleton.obtainedTime > dc.modTime + && singleton.obtainedTime > System.currentTimeMillis()-300000 ) ) ) return singleton; singleton = new WeblogSummary(); try { -- cgit v1.2.3