1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

60 minutes grace period to make sure data is always fresh when TTL is almost about to be exceeded

This commit is contained in:
Reinhard Pointner 2016-03-23 23:39:12 +00:00
parent 08dd0d20ed
commit 8b86e69a8f

View File

@ -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;
}