diff options
author | David A. Madore <david+git@madore.org> | 2014-10-12 01:29:47 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2014-10-12 01:29:47 +0200 |
commit | 3ed00b3a8948ae9db8b0f4c711e74ef8fa06565d (patch) | |
tree | a0e36a5cfef82f3a62bef0ca40579719025189ee | |
parent | 2ca2e684a2b63604188a26567e11953e978c36a5 (diff) | |
download | damlengine-3ed00b3a8948ae9db8b0f4c711e74ef8fa06565d.tar.gz damlengine-3ed00b3a8948ae9db8b0f4c711e74ef8fa06565d.tar.bz2 damlengine-3ed00b3a8948ae9db8b0f4c711e74ef8fa06565d.zip |
Don't allow cached weblog summary to age more than five minutes.
-rw-r--r-- | org/madore/damlengine/WeblogSummary.java | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |