From 8b86e69a8fe39081752f863c754558b7c2811156 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 23 Mar 2016 23:39:12 +0000 Subject: [PATCH] 60 minutes grace period to make sure data is always fresh when TTL is almost about to be exceeded --- source/net/filebot/CacheType.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/CacheType.java b/source/net/filebot/CacheType.java index 914703ab..9eaa9ee1 100644 --- a/source/net/filebot/CacheType.java +++ b/source/net/filebot/CacheType.java @@ -12,15 +12,15 @@ public enum CacheType { Weekly(Duration.ofDays(12), true), - Daily(Duration.ofDays(1), true), + Daily(Duration.ofHours(24), true), - Ephemeral(Duration.ofHours(2), false); + Ephemeral(Duration.ofHours(6), false); final long timeToLiveSeconds; final boolean diskPersistent; CacheType(Duration timeToLive, boolean diskPersistent) { - this.timeToLiveSeconds = timeToLive.getSeconds(); + this.timeToLiveSeconds = timeToLive.minusHours(1).getSeconds(); // 60 minutes grace period to make sure data is always fresh when TTL is almost about to be exceeded this.diskPersistent = diskPersistent; }